1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

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.
This commit is contained in:
Misa 2020-06-17 22:58:44 -07:00 committed by Ethan Lee
parent 0ee5c07f4a
commit 62441edbc9

View file

@ -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++;