X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;ds=sidebyside;f=world_render.h;h=d2e615d2b754d9813b7d97e3846a8e8bd4e1e457;hb=bdac014448b6ec968fe645f1581f321144f07dba;hp=a73998a778888c9a573dedf582f89195783059b2;hpb=a64c18c5996fd5ac9601239f91b12275f04f9cd9;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_render.h b/world_render.h index a73998a..d2e615d 100644 --- a/world_render.h +++ b/world_render.h @@ -176,6 +176,9 @@ VG_STATIC void render_sky(m4x3f camera) VG_STATIC void render_world_gates( m4x4f projection, v3f playerco, m4x3f camera ) { + if( !world.gate_count ) + return; + float closest = INFINITY; int id = 0; @@ -209,6 +212,9 @@ VG_STATIC void render_world( m4x4f projection, m4x3f camera ) int closest = 0; float min_dist = INFINITY; + if( !world.route_count ) + return; + for( int i=0; i