1
0

Implemented the OnWorldTick hook.

Triggerred for each world every time it ticks, parameters are the cWorld and the previous tick length (a_Dt)
This commit is contained in:
madmaxoft
2013-08-19 09:28:22 +02:00
parent 909a9c6973
commit dd030fa892
6 changed files with 40 additions and 0 deletions

View File

@@ -576,6 +576,9 @@ void cWorld::Stop(void)
void cWorld::Tick(float a_Dt)
{
// Call the plugins
cPluginManager::Get()->CallHookWorldTick(*this, a_Dt);
// We need sub-tick precision here, that's why we store the time in seconds and calculate ticks off of it
m_WorldAgeSecs += (double)a_Dt / 1000.0;
m_TimeOfDaySecs += (double)a_Dt / 1000.0;