summaryrefslogtreecommitdiffstats
path: root/src/core/Clock.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-02 10:38:54 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-02 12:32:25 +0100
commit42e4a068bb1cd363c3ed308e10c2747a6035e2de (patch)
tree7e9ce483e3a9eab7d23ec4c4e6476f22ecfa761e /src/core/Clock.cpp
parentPartial controller buttons support (diff)
downloadre3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.tar
re3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.tar.gz
re3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.tar.bz2
re3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.tar.lz
re3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.tar.xz
re3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.tar.zst
re3-42e4a068bb1cd363c3ed308e10c2747a6035e2de.zip
Diffstat (limited to 'src/core/Clock.cpp')
-rw-r--r--src/core/Clock.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/Clock.cpp b/src/core/Clock.cpp
index 6c54ac63..b391e508 100644
--- a/src/core/Clock.cpp
+++ b/src/core/Clock.cpp
@@ -4,6 +4,7 @@
#include "Pad.h"
#include "Clock.h"
#include "Stats.h"
+#include "VarConsole.h"
// --MIAMI: File done
@@ -20,6 +21,10 @@ uint32 CClock::ms_nMillisecondsPerGameMinute;
uint32 CClock::ms_nLastClockTick;
bool CClock::ms_bClockHasBeenStored;
+#ifndef MASTER
+bool gbFreezeTime;
+#endif
+
void
CClock::Initialise(uint32 scale)
{
@@ -31,6 +36,10 @@ CClock::Initialise(uint32 scale)
ms_nLastClockTick = CTimer::GetTimeInMilliseconds();
ms_bClockHasBeenStored = false;
debug("CClock ready\n");
+#ifndef MASTER
+ VarConsole.Add("Time (hour of day)", &ms_nGameClockHours, 1, 0, 23, true);
+ VarConsole.Add("Freeze time", &gbFreezeTime, true);
+#endif
}
void
@@ -50,6 +59,10 @@ CClock::Update(void)
}
}
+#ifndef MASTER
+ else if (gbFreezeTime)
+ ms_nLastClockTick = CTimer::GetTimeInMilliseconds();
+#endif
else if(CTimer::GetTimeInMilliseconds() - ms_nLastClockTick > ms_nMillisecondsPerGameMinute || gbFastTime)
{
ms_nGameClockMinutes++;