From 47c928cab7d1ff73e50925bc7ef50586b6ec9821 Mon Sep 17 00:00:00 2001 From: Howaner Date: Mon, 11 Aug 2014 00:20:28 +0200 Subject: Exported daylight cycle flag to the protocol. --- src/World.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/World.cpp') diff --git a/src/World.cpp b/src/World.cpp index dcca0519e..5298f3b03 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -2250,13 +2250,6 @@ void cWorld::BroadcastThunderbolt(int a_BlockX, int a_BlockY, int a_BlockZ, cons void cWorld::BroadcastTimeUpdate(const cClientHandle * a_Exclude) { - int TimeOfDay = m_TimeOfDay; - if (!m_IsDaylightCycleEnabled) - { - // 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); for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) { @@ -2265,7 +2258,7 @@ void cWorld::BroadcastTimeUpdate(const cClientHandle * a_Exclude) { continue; } - ch->SendTimeUpdate(m_WorldAge, TimeOfDay); + ch->SendTimeUpdate(m_WorldAge, m_TimeOfDay, m_IsDaylightCycleEnabled); } } -- cgit v1.2.3