double start_time = 0.0;
u32 last_version=0;
+ f64 last_time = 0.0;
+ ent_checkpoint *last_cp = NULL;
u32 valid_sections=0;
int clean = !localplayer.rewinded_since_last_gate;
else valid_sections = 0;
}
- last_version = rg->timing_version;
-
vg_info( "%u %f [%s]\n", rg->timing_version, rg->timing_time,
i? ((rg->flags & k_ent_gate_clean_pass)? "CLEAN": " "):
" N/A ");
if( !(rg->flags & k_ent_gate_clean_pass) )
clean = 0;
+
+ last_version = rg->timing_version;
+ last_time = rg->timing_time;
+ last_cp = cp;
}
if( world_static.current_run_version == last_version+1 ){
if( route->checkpoints_count == 1 ){
route->timing_base = world_static.time;
}
+
+ f32 section = world_static.time - last_time;
+ if( (section < last_cp->best_time) || (last_cp->best_time == 0.0f) ){
+ last_cp->best_time = section;
+ }
}
else valid_sections = 0;
ent_gate *gate = mdl_arritm( &world->ent_gate, i );
}
+ for( u32 i=0; i<mdl_arrcount(&world->ent_checkpoint); i++ ){
+ ent_checkpoint *cp = mdl_arritm( &world->ent_checkpoint, i );
+ cp->best_time = 0.0;
+ }
+
world_routes_clear( world );
}