summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/World.cpp4
-rw-r--r--src/World.h2
2 files changed, 3 insertions, 3 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++)
{
diff --git a/src/World.h b/src/World.h
index 2fd7319cf..1fe2740ad 100644
--- a/src/World.h
+++ b/src/World.h
@@ -773,7 +773,7 @@ private:
ScheduledTaskList m_ScheduledTasks;
/// Current Tick number for sceduled tasks
- int m_TickID;
+ long m_TickID;
/// Guards m_Clients
cCriticalSection m_CSClients;