rewinds
[carveJwlIkooP6JGAAIwe30JlM.git] / world_routes.h
index 480f70504a9b714861b0c0e8c3ef0bbfb1752f45..3de9278b5a13079cef0df65717b29058a00e9e93 100644 (file)
@@ -431,7 +431,7 @@ static void world_routes_ui_draw( u32 route, v4f colour, float offset )
    fade_colour[3] *= 1.0f-fade_amt;
 
    /* 1 minute timer */
-   float timer_delta = (vg.time - world.routes.last_interaction) * (1.0/60.0),
+   float timer_delta = (vg.time - world.routes.last_interaction) * (1.0/30.0),
          timer_scale = 1.0f - vg_minf( timer_delta, 1.0f );
 
    /* 
@@ -496,7 +496,15 @@ static void world_routes_local_set_record( u32 route, double lap_time )
       temp.time     = time_centiseconds;
 
       highscores_push_record( &temp );
-      track_infos[ pr->track_id ].push = 1;
+
+      struct track_info *pti = &track_infos[ pr->track_id ];
+      pti->push = 1;
+      
+      if( pti->achievement_id )
+      {
+         steam_set_achievement( pti->achievement_id );
+         steam_store_achievements();
+      }
    }
    else
    {