From 756f20433a4f244d72c5f0ce76f37427948a7e8b Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 17 Dec 2012 14:23:17 +0000 Subject: Fixed time calculation in cWorld::Tick() Should fix chunk saving bug in http://forum.mc-server.org/showthread.php?tid=434&pid=5663#pid5663 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1079 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/World.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/World.cpp') diff --git a/source/World.cpp b/source/World.cpp index 6bb78a16c..9fb5519f2 100644 --- a/source/World.cpp +++ b/source/World.cpp @@ -446,8 +446,8 @@ void cWorld::Tick(float a_Dt) m_TimeOfDaySecs -= 1200.0; } - m_WorldAge = (Int64)(m_WorldAgeSecs / 20.0); - m_TimeOfDay = (Int64)(m_TimeOfDaySecs / 20.0); + m_WorldAge = (Int64)(m_WorldAgeSecs * 20.0); + m_TimeOfDay = (Int64)(m_TimeOfDaySecs * 20.0); // Broadcase time update every 40 ticks (2 seconds) if (m_LastTimeUpdate < m_WorldAge - 40) -- cgit v1.2.3