summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r--src/ClientHandle.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 3e046f38d..286c17513 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -342,7 +342,16 @@ void cClientHandle::Authenticate(const AString & a_Name, const AString & a_UUID,
}
// Send time
- m_Protocol->SendTimeUpdate(World->GetWorldAge(), World->GetTimeOfDay());
+ Int64 TimeOfDay = World->GetTimeOfDay();
+ if (!World->IsDaylightCycleEnabled())
+ {
+ TimeOfDay *= -1;
+ if (TimeOfDay == 0)
+ {
+ TimeOfDay = -1;
+ }
+ }
+ m_Protocol->SendTimeUpdate(World->GetWorldAge(), TimeOfDay);
// Send contents of the inventory window
m_Protocol->SendWholeInventory(*m_Player->GetWindow());