summaryrefslogtreecommitdiffstats
path: root/source/PluginManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/PluginManager.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp
index de1963f91..104f58aaa 100644
--- a/source/PluginManager.cpp
+++ b/source/PluginManager.cpp
@@ -1180,6 +1180,27 @@ bool cPluginManager::CallHookWeatherChanging(cWorld & a_World, eWeather & a_NewW
+bool cPluginManager::CallHookWorldTick(cWorld & a_World, float a_Dt)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_WORLD_TICK);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnWorldTick(a_World, a_Dt))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
bool cPluginManager::HandleCommand(cPlayer * a_Player, const AString & a_Command, bool a_ShouldCheckPermissions)
{
ASSERT(a_Player != NULL);