X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=ent_glider.c;fp=ent_glider.c;h=d1e2a36e581786d49d030764563239163ab6b269;hb=888e62fcd8f9777cee774fbb8fab2e52660303a7;hp=0000000000000000000000000000000000000000;hpb=0d211bc488751a2cbc380990492ec549e91b19ca;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/ent_glider.c b/ent_glider.c new file mode 100644 index 0000000..d1e2a36 --- /dev/null +++ b/ent_glider.c @@ -0,0 +1,21 @@ +#pragma once +#include "entity.h" +#include "player_glide.h" + +static void 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 ){ + glider->flags |= 0x1; + } + else if( call->function == 1 ){ + if( glider->flags & 0x1 ){ + player_glide_equip_glider(); + } + } + else { + vg_print_backtrace(); + vg_error( "Unhandled function id: %i\n", call->function ); + } +}