X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_routes.h;h=91456aa0afdbde6bb4f42937aceaab8399a06a79;hb=620beae94b362ae4d4c42e5ba3329a6211d67a8f;hp=05ef3c9586a8094634ed20e448ca6236d4b5b72a;hpb=dd5c7c307f156768189af84603ec6f1f3b887bb4;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_routes.h b/world_routes.h index 05ef3c9..91456aa 100644 --- a/world_routes.h +++ b/world_routes.h @@ -564,7 +564,8 @@ VG_STATIC void world_bind_light_index( world_instance *world, GLuint shader, GLuint location, int slot ); -VG_STATIC void render_world_routes( world_instance *world, camera *cam ) +VG_STATIC void render_world_routes( world_instance *world, camera *cam, + int layer_depth ) { m4x3f identity_matrix; m4x3_identity( identity_matrix ); @@ -626,8 +627,9 @@ VG_STATIC void render_world_routes( world_instance *world, camera *cam ) shader_model_gate_uColour( colour ); - u32 next = route->checkpoints_start + - (route->active_checkpoint+1) % route->checkpoints_count; + u32 next = route->active_checkpoint+1+layer_depth; + next = next % route->checkpoints_count; + next += route->checkpoints_start; ent_checkpoint *cp = mdl_arritm( &world->ent_checkpoint, next ); ent_gate *gate = mdl_arritm( &world->ent_gate, cp->gate_index );