return 0;
}
-void ent_gate_call( world_instance *world, ent_call *call )
+entity_call_result ent_gate_call( world_instance *world, ent_call *call )
{
u32 index = mdl_entity_id_id( call->id );
ent_gate *gate = mdl_arritm( &world->ent_gate, index );
- if( call->function == 0 ){ /* unlock() */
+ if( call->function == 0 ) /* unlock() */
+ {
gate->flags &= ~k_ent_gate_locked;
+ return k_entity_call_result_OK;
}
- else {
- vg_print_backtrace();
- vg_error( "Unhandled function id: %u\n", call->function );
+ else
+ {
+ return k_entity_call_result_unhandled;
}
}
*/
void world_unlink_nonlocal( world_instance *world )
{
- for( u32 j=0; j<mdl_arrcount(&world->ent_gate); j ++ ){
+ for( u32 j=0; j<mdl_arrcount(&world->ent_gate); j ++ )
+ {
ent_gate *gate = mdl_arritm( &world->ent_gate, j );
- if( gate->flags & k_ent_gate_nonlocal ){
+ if( gate->flags & k_ent_gate_nonlocal )
+ {
gate->flags &= ~k_ent_gate_linked;
}
}