}
if( gate ){
-#if 0
- world_instance *dest_world = &world_global.worlds[ gate->world_index ];
- render_gate( dest_world, gate, cam, layer_depth );
-#else
- render_gate( world, gate, cam, layer_depth );
-#endif
-
/* should really be set in fixed update since its used in the physics
* of most systems. too bad! */
world->rendering_gate = gate;
+
+ if( gate->type == k_gate_type_teleport ){
+ render_gate( world, gate, cam, layer_depth );
+ }
+ else if( gate->type == k_gate_type_nonlocel ){
+ world_instance *dest_world = &world_global.worlds[ gate->target ];
+ render_gate( dest_world, gate, cam, layer_depth );
+ }
+ else
+ world->rendering_gate = NULL;
}
}
static double g_time = 0.0;
g_time += vg.time_delta * (1.0/(k_day_length*60.0));
-
struct ub_world_lighting *state = &world->ub_lighting;
state->g_time = g_time;