server loopback tool
[carveJwlIkooP6JGAAIwe30JlM.git] / ent_glider.c
1 #pragma once
2 #include "entity.h"
3 #include "player_glide.h"
4
5 entity_call_result ent_glider_call( world_instance *world, ent_call *call )
6 {
7 u32 index = mdl_entity_id_id( call->id );
8 ent_glider *glider = mdl_arritm( &world->ent_glider, index );
9
10 if( call->function == 0 )
11 {
12 glider->flags |= 0x1;
13 return k_entity_call_result_OK;
14 }
15 else if( call->function == 1 )
16 {
17 if( glider->flags & 0x1 )
18 {
19 player_glide_equip_glider();
20 }
21 return k_entity_call_result_OK;
22 }
23 else
24 return k_entity_call_result_unhandled;
25 }