update helpers/location to 'frosted' ui
[carveJwlIkooP6JGAAIwe30JlM.git] / ent_relay.c
1 #include "ent_relay.h"
2
3 entity_call_result ent_relay_call( world_instance *world, ent_call *call )
4 {
5 u32 index = mdl_entity_id_id( call->id );
6 ent_relay *relay = mdl_arritm( &world->ent_relay, index );
7
8 if( call->function == 0 )
9 {
10 for( u32 i=0; i<vg_list_size(relay->targets); i++ )
11 {
12 if( relay->targets[i][0] )
13 {
14 ent_call call;
15 call.data = NULL;
16 call.function = relay->targets[i][1];
17 call.id = relay->targets[i][0];
18 entity_call( world, &call );
19 }
20 }
21 return k_entity_call_result_OK;
22 }
23 else
24 return k_entity_call_result_unhandled;
25 }