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]
/
world_gate.c
diff --git
a/world_gate.c
b/world_gate.c
index 26ce0924ff39dcb2f7d83fcbd472b8665750a13b..2a236d4391c0d8d7f67d8bcc94bcbad42151a787 100644
(file)
--- a/
world_gate.c
+++ b/
world_gate.c
@@
-295,17
+295,19
@@
u32 world_intersect_gates( world_instance *world, v3f pos, v3f last )
return 0;
}
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 );
{
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;
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
;
}
}
}
}
@@
-315,10
+317,12
@@
void ent_gate_call( world_instance *world, ent_call *call )
*/
void world_unlink_nonlocal( world_instance *world )
{
*/
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 );
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;
}
}
gate->flags &= ~k_ent_gate_linked;
}
}