summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-08-10 20:06:03 +0200
committerHowaner <franzi.moos@googlemail.com>2014-08-10 20:06:03 +0200
commit42bad0edec58f42e4072360c52870d3be9ced3c5 (patch)
tree782cd9149c3a0472ec332e2a06c9d8c86e9181d8 /src/World.cpp
parentAdded IsDaylightCycleEnabled saving. (diff)
downloadcuberite-42bad0edec58f42e4072360c52870d3be9ced3c5.tar
cuberite-42bad0edec58f42e4072360c52870d3be9ced3c5.tar.gz
cuberite-42bad0edec58f42e4072360c52870d3be9ced3c5.tar.bz2
cuberite-42bad0edec58f42e4072360c52870d3be9ced3c5.tar.lz
cuberite-42bad0edec58f42e4072360c52870d3be9ced3c5.tar.xz
cuberite-42bad0edec58f42e4072360c52870d3be9ced3c5.tar.zst
cuberite-42bad0edec58f42e4072360c52870d3be9ced3c5.zip
Diffstat (limited to '')
-rw-r--r--src/World.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 0ae7f80a6..dcca0519e 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -2253,11 +2253,8 @@ void cWorld::BroadcastTimeUpdate(const cClientHandle * a_Exclude)
int TimeOfDay = m_TimeOfDay;
if (!m_IsDaylightCycleEnabled)
{
- TimeOfDay *= -1;
- if (TimeOfDay == 0)
- {
- TimeOfDay = -1;
- }
+ // When writing a "-" before the number the client ignores it but it will stop the client-side time expiration.
+ TimeOfDay = std::min(-TimeOfDay, -1);
}
cCSLock Lock(m_CSPlayers);