d1e2a36e581786d49d030764563239163ab6b269
[carveJwlIkooP6JGAAIwe30JlM.git] / ent_glider.c
1 #pragma once
2 #include "entity.h"
3 #include "player_glide.h"
4
5 static void ent_glider_call( world_instance *world, ent_call *call ){
6 u32 index = mdl_entity_id_id( call->id );
7 ent_glider *glider = mdl_arritm( &world->ent_glider, index );
8
9 if( call->function == 0 ){
10 glider->flags |= 0x1;
11 }
12 else if( call->function == 1 ){
13 if( glider->flags & 0x1 ){
14 player_glide_equip_glider();
15 }
16 }
17 else {
18 vg_print_backtrace();
19 vg_error( "Unhandled function id: %i\n", call->function );
20 }
21 }