projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
controls overlay
[carveJwlIkooP6JGAAIwe30JlM.git]
/
ent_relay.c
diff --git
a/ent_relay.c
b/ent_relay.c
index 357031b049cd9b0f05ef775cea53580ef227d554..1f97584af5843f1b0384a73f9dde4bfc3be5339b 100644
(file)
--- a/
ent_relay.c
+++ b/
ent_relay.c
@@
-1,15
+1,16
@@
-#ifndef ENT_RELAY_C
-#define ENT_RELAY_C
+#include "ent_relay.h"
-#include "entity.h"
-
-static 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 );
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; i<vg_list_size(relay->targets); i++ ){
- if( relay->targets[i][0] ){
+ if( call->function == 0 )
+ {
+ for( u32 i=0; i<vg_list_size(relay->targets); i++ )
+ {
+ if( relay->targets[i][0] )
+ {
ent_call call;
call.data = NULL;
call.function = relay->targets[i][1];
ent_call call;
call.data = NULL;
call.function = relay->targets[i][1];
@@
-17,11
+18,8
@@
static void ent_relay_call( world_instance *world, ent_call *call ){
entity_call( world, &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;
}
}
-
-#endif /* ENT_RELAY_C */