for( u32 i=0; i<mdl_arrcount(&world->ent_gate); i++ ){
ent_gate *gi = mdl_arritm( &world->ent_gate, i );
- if( !(gi->flags & (k_ent_gate_linked|k_ent_gate_nonlocal_DELETED|
- k_ent_gate_locked)) )
- continue;
-
float dist = v3_dist2( gi->co[0], cam->transform[3] );
vg_line_point( gi->co[0], 0.25f, VG__BLUE );
}
world->rendering_gate = gate;
- if( gate )
- render_gate( world, world, gate, cam );
+
+ if( gate ){
+ if( gate->flags & k_ent_gate_locked ){
+ world->rendering_gate = NULL;
+ return;
+ }
+
+ if( gate->flags & k_ent_gate_nonlocal ){
+ if( world_static.load_state != k_world_loader_none ){
+ world->rendering_gate = NULL;
+ return;
+ }
+
+ world_instance *dest_world = &world_static.instances[ gate->target ];
+ render_gate( world, dest_world, gate, cam );
+ }
+ else
+ render_gate( world, world, gate, cam );
+ }
}
static void world_prerender( world_instance *world ){