mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Don't tick timer if in time trial countdown
In 2.2 and previous, the game would call resetgameclock() every frame for the last 30 frames of the time trial countdown in order to make sure it gets reset. This was in a render function, and didn't get brought out in 2.3, so 2.3 resets the game clock *while rendering*, which is kinda bad and is an oversight on my part for not noticing. Instead of doing that, just add a conditional to the timer so that it won't tick during the time trial countdown. This fixes #699 even further by making it so the time trial par can't even be lost during the countdown, because the timer won't tick up - so you can never get a sad squeak to play by pausing the game or unfocus-pausing it during the countdown.
This commit is contained in:
parent
2517900010
commit
01ba834086
2 changed files with 5 additions and 1 deletions
|
@ -5683,6 +5683,11 @@ std::string Game::unrescued(void)
|
|||
|
||||
void Game::gameclock(void)
|
||||
{
|
||||
if (timetrialcountdown > 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
frames++;
|
||||
if (frames >= 30)
|
||||
{
|
||||
|
|
|
@ -1769,7 +1769,6 @@ void gamerender(void)
|
|||
{
|
||||
if (game.timetrialcountdown < 30)
|
||||
{
|
||||
game.resetgameclock();
|
||||
if (int(game.timetrialcountdown / 4) % 2 == 0) graphics.bigprint( -1, 100, "Go!", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4);
|
||||
}
|
||||
else if (game.timetrialcountdown < 60)
|
||||
|
|
Loading…
Reference in a new issue