From 3e549a7d4484340d8d71500a7e61f81f403f48cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sat, 29 Aug 2020 19:22:25 +0300 Subject: CGame done, Peds, fixes --- src/core/Clock.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/core/Clock.cpp') diff --git a/src/core/Clock.cpp b/src/core/Clock.cpp index e4b908e0..6c54ac63 100644 --- a/src/core/Clock.cpp +++ b/src/core/Clock.cpp @@ -5,6 +5,8 @@ #include "Clock.h" #include "Stats.h" +// --MIAMI: File done + _TODO("gbFastTime"); bool gbFastTime; @@ -73,8 +75,14 @@ CClock::Update(void) void CClock::SetGameClock(uint8 h, uint8 m) { - ms_nGameClockHours = h; + while (m >= 60) { + m -= 60; + h++; + } ms_nGameClockMinutes = m; + while (h >= 24) + h -= 24; + ms_nGameClockHours = h; ms_nGameClockSeconds = 0; ms_nLastClockTick = CTimer::GetTimeInMilliseconds(); } -- cgit v1.2.3