}
VG_STATIC void world_routes_place_curve( world_instance *world,
- v4f h[4], v3f n0, v3f n2 )
+ v4f h[3], v3f n0, v3f n2 )
{
float t;
v3f p, pd;
}
for( u32 i=0; i<mdl_arrcount(&world->ent_route_node); i++ ){
- ent_route_node *rn = mdl_arritm( &world->ent_route, i );
+ ent_route_node *rn = mdl_arritm( &world->ent_route_node, i );
rn->ref_count = 0;
rn->ref_total = 0;
}
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 );
mesh_bind( &world_global.mesh_gate );
/* skip writing into the motion vectors for this */
+ /* TODO: draw future gate if the one we're looking through is to be passed,
+ * instead of current gate */
glDrawBuffers( 1, (GLenum[]){ GL_COLOR_ATTACHMENT0 } );
for( u32 i=0; i<mdl_arrcount(&world->ent_route); i++ ){
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 );