X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_render.c;h=ba093b92d75bac2c40172d45b363ef4833624d48;hb=844527ec68c063d78d4993bd8e4053f9ddc47b78;hp=a7ff25ccf3639c1eff192e104e13064c30139937;hpb=6ab4435fb19beb6af6c52691793d5ca17a120f69;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_render.c b/world_render.c index a7ff25c..ba093b9 100644 --- a/world_render.c +++ b/world_render.c @@ -23,7 +23,7 @@ VG_STATIC void async_world_render_init( void *payload, u32 size ) { vg_info( "Allocate uniform buffers\n" ); for( int i=0; i<4; i++ ){ - world_instance *world = &world_static.worlds[i]; + world_instance *world = &world_static.instances[i]; world->ubo_bind_point = i; glGenBuffers( 1, &world->ubo_lighting ); @@ -37,7 +37,7 @@ VG_STATIC void async_world_render_init( void *payload, u32 size ) vg_info( "Allocate frame buffers\n" ); for( int i=0; i<4; i++ ){ - world_instance *world = &world_static.worlds[i]; + world_instance *world = &world_static.instances[i]; struct framebuffer *fb = &world->heightmap; fb->display_name = NULL; @@ -535,13 +535,15 @@ VG_STATIC void render_world_gates( world_instance *world, camera *cam, world->rendering_gate = gate; if( gate ){ + if( gate->flags & k_ent_gate_locked ) return; + if( gate->flags & k_ent_gate_nonlocal ){ - if( world_loader.state != k_world_loader_none ){ + if( world_static.load_state != k_world_loader_none ){ world->rendering_gate = NULL; return; } - world_instance *dest_world = &world_static.worlds[ gate->target ]; + world_instance *dest_world = &world_static.instances[ gate->target ]; render_gate( world, dest_world, gate, cam, layer_depth ); } else{