X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_gate.c;fp=world_gate.c;h=0a645518770484ce6ace789cc59bbdb6cfe9d5f7;hb=44459e0aa734b6a090d60a309e29a9a2a232c731;hp=a4cf8fdc703e8b21ae976918e924bbb5206fb671;hpb=6ab4435fb19beb6af6c52691793d5ca17a120f69;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_gate.c b/world_gate.c index a4cf8fd..0a64551 100644 --- a/world_gate.c +++ b/world_gate.c @@ -265,6 +265,7 @@ VG_STATIC ent_gate *world_intersect_gates( world_instance *world, ent_gate *gate = mdl_arritm( &world->ent_gate, i ); if( !(gate->flags & k_ent_gate_linked) ) continue; + if( gate->flags & k_ent_gate_locked ) continue; if( gate->flags & k_ent_gate_nonlocal ){ if( world_loader.state != k_world_loader_none ){ @@ -367,4 +368,17 @@ matched:; } } +VG_STATIC void 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 ); + + if( call->function == 0 ){ /* unlock() */ + gate->flags &= ~k_ent_gate_locked; + } + else { + vg_print_backtrace(); + vg_error( "Unhandled function id: %u\n", call->function ); + } +} + #endif /* WORLD_GATE_C */