From 62441edbc9b279d4e37ea6a640f376288ffc8417 Mon Sep 17 00:00:00 2001 From: Misa Date: Wed, 17 Jun 2020 22:58:44 -0700 Subject: [PATCH] Account for hours when calculating time trial result time This prevents being able to "roll over" the amount of minutes to 0 (by simply waiting for the timer to tick past one hour) and being able to get a result of 00:13 when your result is really 01:00:13. By looking only at the minutes, the game would read 01:00:13 as 00:13 instead. So simply add the amount of hours to the time trial result. --- desktop_version/src/Game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 2c2c7d4d..5ffe5e9b 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -1372,7 +1372,7 @@ void Game::updatestate() //Time Trial Complete! obj.removetrigger(82); hascontrol = false; - timetrialresulttime = seconds + (minutes * 60); + timetrialresulttime = seconds + (minutes * 60) + (hours * 60 * 60); timetrialrank = 0; if (timetrialresulttime <= timetrialpar) timetrialrank++; if (trinkets() >= timetrialshinytarget) timetrialrank++;