#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;
}