to the workers of the world
[carveJwlIkooP6JGAAIwe30JlM.git] / skaterift.c
index 6343098c874d59ef03c12fe2426c7a6232f7986e..4b7323776dd406550ccc28e13caed317fb4da0f0 100644 (file)
@@ -22,7 +22,7 @@
 
 
 #include "player.h"
-VG_STATIC player_instance localplayer;
+static player_instance localplayer;
 VG_STATIC struct player_avatar localplayer_avatar;
 VG_STATIC glmesh localplayer_meshes[3];
 vg_tex2d localplayer_texture = { .path = "textures/ch_gradient.qoi" };
@@ -498,7 +498,7 @@ VG_STATIC void render_scene(void)
       return;
    }
 
-   render_world( view_world, &main_camera );
+   render_world( view_world, &main_camera, 0 );
 
    int player_transparent = 1,
        player_draw        = 1;
@@ -513,10 +513,13 @@ VG_STATIC void render_scene(void)
       player__render( &main_camera, &localplayer );
 
 
-   render_water_texture( view_world, &main_camera );
+   render_water_texture( view_world, &main_camera, 0 );
    render_fb_bind( gpipeline.fb_main );
    render_water_surface( view_world, &main_camera );
-   render_world_gates( view_world, &main_camera );
+
+   int depth = 1;
+   if( localplayer.gate_waiting ) depth = 0;
+   render_world_gates( view_world, &main_camera, depth );
 
    if( player_transparent && player_draw )
       render_player_transparent();