basic features of replay editor
[carveJwlIkooP6JGAAIwe30JlM.git] / ent_relay.c
1 #include "ent_relay.h"
2
3 void 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 for( u32 i=0; i<vg_list_size(relay->targets); i++ ){
10 if( relay->targets[i][0] ){
11 ent_call call;
12 call.data = NULL;
13 call.function = relay->targets[i][1];
14 call.id = relay->targets[i][0];
15 entity_call( world, &call );
16 }
17 }
18 }
19 else {
20 vg_print_backtrace();
21 vg_error( "Unhandled function id: %u\n", call->function );
22 }
23 }