basic npc
[carveJwlIkooP6JGAAIwe30JlM.git] / ent_glider.c
1 #pragma once
2 #include "entity.h"
3 #include "player_glide.h"
4
5 void 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 glider->flags |= 0x1;
12 }
13 else if( call->function == 1 ){
14 if( glider->flags & 0x1 ){
15 player_glide_equip_glider();
16 }
17 }
18 else {
19 vg_print_backtrace();
20 vg_error( "Unhandled function id: %i\n", call->function );
21 }
22 }