X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_render.h;h=4e390368e9f4f51a65283e0534b5e54ef349129a;hb=6b9993651343af73bd48e2213910bbaadb41edaf;hp=ad0d5c43a2d469fdb31c1650a7559241e08a7457;hpb=e70b6d550d63af95cafd9ffdee1918faf02a6892;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_render.h b/world_render.h index ad0d5c4..4e39036 100644 --- a/world_render.h +++ b/world_render.h @@ -359,16 +359,19 @@ VG_STATIC void render_world_gates( world_instance *world, camera *cam, } 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; } } @@ -377,7 +380,6 @@ VG_STATIC void world_prerender( world_instance *world ) 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;