diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-07 00:47:07 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-07 00:47:07 +0100 |
commit | 30ead790490f04248b861db79fddde9148b552f4 (patch) | |
tree | d514486213ab0cf99d33d0580718fd058c3cbc51 /src/PluginLua.cpp | |
parent | Fixed bed leave animation (diff) | |
download | cuberite-30ead790490f04248b861db79fddde9148b552f4.tar cuberite-30ead790490f04248b861db79fddde9148b552f4.tar.gz cuberite-30ead790490f04248b861db79fddde9148b552f4.tar.bz2 cuberite-30ead790490f04248b861db79fddde9148b552f4.tar.lz cuberite-30ead790490f04248b861db79fddde9148b552f4.tar.xz cuberite-30ead790490f04248b861db79fddde9148b552f4.tar.zst cuberite-30ead790490f04248b861db79fddde9148b552f4.zip |
Diffstat (limited to '')
-rw-r--r-- | src/PluginLua.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/PluginLua.cpp b/src/PluginLua.cpp index 110010087..7fc7bc5f1 100644 --- a/src/PluginLua.cpp +++ b/src/PluginLua.cpp @@ -550,14 +550,14 @@ bool cPluginLua::OnLogin(cClientHandle * a_Client, int a_ProtocolVersion, const -bool cPluginLua::OnPlayerAnimation(cPlayer & a_Player, int a_Animation) +bool cPluginLua::OnEntityAnimation(cEntity & a_Entity, int a_Animation) { cCSLock Lock(m_CriticalSection); bool res = false; - cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_PLAYER_ANIMATION]; + cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_ENTITY_ANIMATION]; for (cLuaRefs::iterator itr = Refs.begin(), end = Refs.end(); itr != end; ++itr) { - m_LuaState.Call((int)(**itr), &a_Player, a_Animation, cLuaState::Return, res); + m_LuaState.Call((int)(**itr), &a_Entity, a_Animation, cLuaState::Return, res); if (res) { return true; @@ -1287,11 +1287,11 @@ const char * cPluginLua::GetHookFnName(int a_HookType) case cPluginManager::HOOK_COLLECTING_PICKUP: return "OnCollectingPickup"; case cPluginManager::HOOK_CRAFTING_NO_RECIPE: return "OnCraftingNoRecipe"; case cPluginManager::HOOK_DISCONNECT: return "OnDisconnect"; + case cPluginManager::HOOK_ENTITY_ANIMATION: return "OnEntityAnimation"; case cPluginManager::HOOK_EXECUTE_COMMAND: return "OnExecuteCommand"; case cPluginManager::HOOK_HANDSHAKE: return "OnHandshake"; case cPluginManager::HOOK_KILLING: return "OnKilling"; case cPluginManager::HOOK_LOGIN: return "OnLogin"; - case cPluginManager::HOOK_PLAYER_ANIMATION: return "OnPlayerAnimation"; case cPluginManager::HOOK_PLAYER_BREAKING_BLOCK: return "OnPlayerBreakingBlock"; case cPluginManager::HOOK_PLAYER_BROKEN_BLOCK: return "OnPlayerBrokenBlock"; case cPluginManager::HOOK_PLAYER_EATING: return "OnPlayerEating"; |