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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user