u32 last_version=0;
u32 valid_count=0;
+ int clean = 1;
for( u32 i=0; i<route->checkpoints_count; i++ ){
u32 cpid = (i+route->active_checkpoint) % route->checkpoints_count;
}
last_version = rg->timing_version;
- vg_info( "%u %f\n", rg->timing_version, rg->timing_time );
+
+ vg_info( "%u %f [%s]\n", rg->timing_version, rg->timing_time,
+ (rg->flags & k_ent_gate_clean_pass)? "CLEAN": "-----");
+
+ if( !(rg->flags & k_ent_gate_clean_pass) )
+ clean = 0;
}
if( world_static.current_run_version == last_version+1 ){
if( valid_count==route->checkpoints_count ){
f64 lap_time = world_static.time - start_time;
- //world_routes_local_set_record( world, route, lap_time );
+ if( (route->best_laptime == 0.0) || (lap_time < route->best_laptime) ){
+ route->best_laptime = lap_time;
+ route->achievment_status |= 0x1;
+
+ if( clean )
+ route->achievment_status |= 0x2;
+ }
+
+ /* for steam achievements. */
if( route->anon.official_track_id != 0xffffffff ){
struct track_info *ti = &track_infos[ route->anon.official_track_id ];
if( ti->achievement_id ){
world_static.last_use = world_static.time;
ent_gate *dest = mdl_arritm( &world->ent_gate, rg->target );
+ if( localplayer.rewinded_since_last_gate ){
+ localplayer.rewinded_since_last_gate = 0;
+ dest->flags &= ~k_ent_gate_clean_pass;
+ }
+ else
+ dest->flags |= k_ent_gate_clean_pass;
+
for( u32 i=0; i<mdl_arrcount(&world->ent_route); i++ ){
ent_route *route = mdl_arritm( &world->ent_route, i );