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

@@ -106,6 +106,7 @@ public: // tolua_export
HOOK_UPDATING_SIGN,
HOOK_WEATHER_CHANGED,
HOOK_WEATHER_CHANGING,
HOOK_WORLD_TICK,
// Note that if a hook type is added, it may need processing in cPlugin::CanAddHook() descendants,
// and it definitely needs adding in cPlugin_NewLua::GetHookFnName() !
@@ -184,6 +185,7 @@ public: // tolua_export
bool CallHookUpdatingSign (cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, AString & a_Line1, AString & a_Line2, AString & a_Line3, AString & a_Line4, cPlayer * a_Player);
bool CallHookWeatherChanged (cWorld & a_World);
bool CallHookWeatherChanging (cWorld & a_World, eWeather & a_NewWeather);
bool CallHookWorldTick (cWorld & a_World, float a_Dt);
bool DisablePlugin(const AString & a_PluginName); // tolua_export
bool LoadPlugin (const AString & a_PluginName); // tolua_export