X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=ent_glider.c;h=12b05757cd1ce1c30e9ab933361d69bb475fd9a2;hb=HEAD;hp=d1e2a36e581786d49d030764563239163ab6b269;hpb=217627b6b4eef904ac89b5f7f7f819b3a0970b20;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/ent_glider.c b/ent_glider.c index d1e2a36..12b0575 100644 --- a/ent_glider.c +++ b/ent_glider.c @@ -2,20 +2,24 @@ #include "entity.h" #include "player_glide.h" -static void ent_glider_call( world_instance *world, ent_call *call ){ +entity_call_result ent_glider_call( world_instance *world, ent_call *call ) +{ u32 index = mdl_entity_id_id( call->id ); ent_glider *glider = mdl_arritm( &world->ent_glider, index ); - if( call->function == 0 ){ + if( call->function == 0 ) + { glider->flags |= 0x1; + return k_entity_call_result_OK; } - else if( call->function == 1 ){ - if( glider->flags & 0x1 ){ + else if( call->function == 1 ) + { + if( glider->flags & 0x1 ) + { player_glide_equip_glider(); } + return k_entity_call_result_OK; } - else { - vg_print_backtrace(); - vg_error( "Unhandled function id: %i\n", call->function ); - } + else + return k_entity_call_result_unhandled; }