From dd030fa8920d8cf9c863d2ffdcd791edc1749172 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 19 Aug 2013 09:28:22 +0200 Subject: Implemented the OnWorldTick hook. Triggerred for each world every time it ticks, parameters are the cWorld and the previous tick length (a_Dt) --- source/World.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/World.cpp') diff --git a/source/World.cpp b/source/World.cpp index 70dbb5284..2485a1154 100644 --- a/source/World.cpp +++ b/source/World.cpp @@ -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; -- cgit v1.2.3