Skip to content

Commit

Permalink
Fix spurious out-of-synch messages when pausing in single-player mode.
Browse files Browse the repository at this point in the history
This was caused by forgetting to set the delta tick time to 0 when paused. Don't know whether fixing this fixes anything else.
  • Loading branch information
Cyp committed Oct 16, 2010
1 parent a31521f commit 49e9780
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/gamelib/gtime.c
Expand Up @@ -222,6 +222,12 @@ void gameTimeUpdate()
gameTime += deltaGameTime;
graphicsTime += deltaGraphicsTime;
}
else
{
// The game is paused, so the change in time is zero.
deltaGameTime = 0;
deltaGraphicsTime = 0;
}

// Pre-calculate fraction used in timeAdjustedIncrement
gameTimeFraction = deltaGameTime;
Expand Down

0 comments on commit 49e9780

Please sign in to comment.