summaryrefslogtreecommitdiffstats
path: root/src/core/Clock.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2019-07-18 04:28:06 +0200
committereray orçunus <erayorcunus@gmail.com>2019-07-18 04:28:06 +0200
commit993944c05c9f204a2caf61b973d68b7f7a1c56ab (patch)
tree998813788845b3a334f2f04612136b390a1e872c /src/core/Clock.cpp
parentThe Peds, mainly dying/injuring (diff)
parentmore CAutomobile::ProcessControl (diff)
downloadre3-993944c05c9f204a2caf61b973d68b7f7a1c56ab.tar
re3-993944c05c9f204a2caf61b973d68b7f7a1c56ab.tar.gz
re3-993944c05c9f204a2caf61b973d68b7f7a1c56ab.tar.bz2
re3-993944c05c9f204a2caf61b973d68b7f7a1c56ab.tar.lz
re3-993944c05c9f204a2caf61b973d68b7f7a1c56ab.tar.xz
re3-993944c05c9f204a2caf61b973d68b7f7a1c56ab.tar.zst
re3-993944c05c9f204a2caf61b973d68b7f7a1c56ab.zip
Diffstat (limited to 'src/core/Clock.cpp')
-rw-r--r--src/core/Clock.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core/Clock.cpp b/src/core/Clock.cpp
index 707b0e57..a97dcb5f 100644
--- a/src/core/Clock.cpp
+++ b/src/core/Clock.cpp
@@ -15,7 +15,7 @@ uint8 &CClock::ms_Stored_nGameClockHours = *(uint8*)0x95CD7B;
uint8 &CClock::ms_Stored_nGameClockMinutes = *(uint8*)0x95CD9B;
uint16 &CClock::ms_Stored_nGameClockSeconds = *(uint16*)0x95CC9C;
uint32 &CClock::ms_nMillisecondsPerGameMinute = *(uint32*)0x8F2C64;
-int32 &CClock::ms_nLastClockTick = *(int32*)0x9430E4;
+uint32 &CClock::ms_nLastClockTick = *(uint32*)0x9430E4;
bool &CClock::ms_bClockHasBeenStored = *(bool*)0x95CD82;
void
@@ -67,10 +67,7 @@ CClock::Update(void)
}
}
}
- ms_nGameClockSeconds +=
- 60
- * (CTimer::GetTimeInMilliseconds() - ms_nLastClockTick)
- / ms_nMillisecondsPerGameMinute;
+ ms_nGameClockSeconds = 60 * (CTimer::GetTimeInMilliseconds() - ms_nLastClockTick) / ms_nMillisecondsPerGameMinute;
}
void