summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-01-17 19:23:40 +0100
committerTycho <work.tycho+git@gmail.com>2014-01-17 19:23:40 +0100
commit287144839e446001015b70a34146c6f321812eda (patch)
tree80bc68e3a129c3ebd892a5a50dbbdd60a5e488e3 /src/World.cpp
parentImplemented xsofts suggestion for a saturating counter in the scheduler (diff)
downloadcuberite-287144839e446001015b70a34146c6f321812eda.tar
cuberite-287144839e446001015b70a34146c6f321812eda.tar.gz
cuberite-287144839e446001015b70a34146c6f321812eda.tar.bz2
cuberite-287144839e446001015b70a34146c6f321812eda.tar.lz
cuberite-287144839e446001015b70a34146c6f321812eda.tar.xz
cuberite-287144839e446001015b70a34146c6f321812eda.tar.zst
cuberite-287144839e446001015b70a34146c6f321812eda.zip
Diffstat (limited to '')
-rw-r--r--src/World.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/World.cpp b/src/World.cpp
index e4c03699f..f4b5f1ad8 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -885,7 +885,7 @@ void cWorld::TickScheduledTasks()
} // for itr - m_Tasks[]
// Increment TickID
- m_TickID = (m_TickID+1) &0xFFFF;
+ m_TickID = (m_TickID+1) & 0x7FFFFFFF;
}
@@ -2622,7 +2622,7 @@ void cWorld::QueueTask(cTask * a_Task)
void cWorld::ScheduleTask(cScheduledTask * a_Task)
{
- a_Task->Ticks = (a_Task->Ticks + m_TickID) & 0xFFFF;
+ a_Task->Ticks = (a_Task->Ticks + m_TickID) & 0x7FFFFFFF;
cCSLock Lock(m_CSScheduledTasks);
for(ScheduledTaskList::iterator itr = m_ScheduledTasks.begin(); itr != m_ScheduledTasks.end(); itr++)
{