X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=ent_relay.c;h=1f97584af5843f1b0384a73f9dde4bfc3be5339b;hb=304647a7672165dd35ffe54884ed9aedcc9bf363;hp=50bbeabf690429b442e4d3043de67bf1c655d214;hpb=5f6a4f9df6c8accc89f1920bfe9ace3cbac4c4b6;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/ent_relay.c b/ent_relay.c index 50bbeab..1f97584 100644 --- a/ent_relay.c +++ b/ent_relay.c @@ -1,13 +1,16 @@ #include "ent_relay.h" -void ent_relay_call( world_instance *world, ent_call *call ) +entity_call_result ent_relay_call( world_instance *world, ent_call *call ) { u32 index = mdl_entity_id_id( call->id ); ent_relay *relay = mdl_arritm( &world->ent_relay, index ); - if( call->function == 0 ){ - for( u32 i=0; itargets); i++ ){ - if( relay->targets[i][0] ){ + if( call->function == 0 ) + { + for( u32 i=0; itargets); i++ ) + { + if( relay->targets[i][0] ) + { ent_call call; call.data = NULL; call.function = relay->targets[i][1]; @@ -15,9 +18,8 @@ void ent_relay_call( world_instance *world, ent_call *call ) entity_call( world, &call ); } } + 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; }