1
0

Changed HOOK_PLAYER_MOVED to HOOK_PLAYER_MOVING to match the scheme used for names.

-ING means the event is being processed and may be refused by a plugin, -ED means it has already happenned and the plugin cannot do anything about it.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1174 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2013-01-26 07:50:06 +00:00
parent ab39853d93
commit 7a6ec4fb17
7 changed files with 13 additions and 13 deletions

View File

@ -27,7 +27,7 @@ function Initialize(Plugin)
PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_EATING);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_JOINED);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_LEFT_CLICK);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_MOVED);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_MOVING);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_PLACED_BLOCK);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_PLACING_BLOCK);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_RIGHT_CLICK);
@ -191,8 +191,8 @@ end
function OnPlayerMoved(...)
LogHook("OnPlayerMoved", unpack(arg));
function OnPlayerMoving(...)
LogHook("OnPlayerMoving", unpack(arg));
end

View File

@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
** Generated automatically by tolua++-1.0.92 on 01/25/13 19:08:52.
** Generated automatically by tolua++-1.0.92 on 01/26/13 16:47:03.
*/
#ifndef __cplusplus
@ -21402,7 +21402,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_constant(tolua_S,"HOOK_PLAYER_EATING",cPluginManager::HOOK_PLAYER_EATING);
tolua_constant(tolua_S,"HOOK_PLAYER_JOINED",cPluginManager::HOOK_PLAYER_JOINED);
tolua_constant(tolua_S,"HOOK_PLAYER_LEFT_CLICK",cPluginManager::HOOK_PLAYER_LEFT_CLICK);
tolua_constant(tolua_S,"HOOK_PLAYER_MOVED",cPluginManager::HOOK_PLAYER_MOVED);
tolua_constant(tolua_S,"HOOK_PLAYER_MOVING",cPluginManager::HOOK_PLAYER_MOVING);
tolua_constant(tolua_S,"HOOK_PLAYER_PLACED_BLOCK",cPluginManager::HOOK_PLAYER_PLACED_BLOCK);
tolua_constant(tolua_S,"HOOK_PLAYER_PLACING_BLOCK",cPluginManager::HOOK_PLAYER_PLACING_BLOCK);
tolua_constant(tolua_S,"HOOK_PLAYER_RIGHT_CLICK",cPluginManager::HOOK_PLAYER_RIGHT_CLICK);

View File

@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
** Generated automatically by tolua++-1.0.92 on 01/25/13 19:08:52.
** Generated automatically by tolua++-1.0.92 on 01/26/13 16:47:03.
*/
/* Exported function */

View File

@ -174,7 +174,7 @@ void cPlayer::Tick(float a_Dt, MTRand & a_TickRandom)
}
else if (m_bDirtyPosition)
{
cRoot::Get()->GetPluginManager()->CallHookPlayerMoved(*this);
cRoot::Get()->GetPluginManager()->CallHookPlayerMoving(*this);
float DiffX = (float)(GetPosX() - m_LastPosX );
float DiffY = (float)(GetPosY() - m_LastPosY );

View File

@ -601,9 +601,9 @@ bool cPluginManager::CallHookPlayerLeftClick(cPlayer & a_Player, int a_BlockX, i
bool cPluginManager::CallHookPlayerMoved(cPlayer & a_Player)
bool cPluginManager::CallHookPlayerMoving(cPlayer & a_Player)
{
HookMap::iterator Plugins = m_Hooks.find(HOOK_PLAYER_MOVED);
HookMap::iterator Plugins = m_Hooks.find(HOOK_PLAYER_MOVING);
if (Plugins == m_Hooks.end())
{
return false;

View File

@ -60,7 +60,7 @@ public: // tolua_export
HOOK_PLAYER_EATING,
HOOK_PLAYER_JOINED,
HOOK_PLAYER_LEFT_CLICK,
HOOK_PLAYER_MOVED,
HOOK_PLAYER_MOVING,
HOOK_PLAYER_PLACED_BLOCK,
HOOK_PLAYER_PLACING_BLOCK,
HOOK_PLAYER_RIGHT_CLICK,
@ -111,7 +111,7 @@ public: // tolua_export
bool CallHookPlayerBrokenBlock (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta);
bool CallHookPlayerEating (cPlayer & a_Player);
bool CallHookPlayerJoined (cPlayer & a_Player);
bool CallHookPlayerMoved (cPlayer & a_Player);
bool CallHookPlayerMoving (cPlayer & a_Player);
bool CallHookPlayerLeftClick (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, char a_Status);
bool CallHookPlayerPlacedBlock (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta);
bool CallHookPlayerPlacingBlock (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta);

View File

@ -562,7 +562,7 @@ bool cPlugin_NewLua::OnPlayerLeftClick(cPlayer & a_Player, int a_BlockX, int a_B
bool cPlugin_NewLua::OnPlayerMoved(cPlayer & a_Player)
{
cCSLock Lock(m_CriticalSection);
const char * FnName = GetHookFnName(cPluginManager::HOOK_PLAYER_MOVED);
const char * FnName = GetHookFnName(cPluginManager::HOOK_PLAYER_MOVING);
ASSERT(FnName != NULL);
if (!PushFunction(FnName))
{
@ -1168,7 +1168,7 @@ const char * cPlugin_NewLua::GetHookFnName(cPluginManager::PluginHook a_Hook)
case cPluginManager::HOOK_PLAYER_EATING: return "OnPlayerEating";
case cPluginManager::HOOK_PLAYER_JOINED: return "OnPlayerJoined";
case cPluginManager::HOOK_PLAYER_LEFT_CLICK: return "OnPlayerLeftClick";
case cPluginManager::HOOK_PLAYER_MOVED: return "OnPlayerMoved";
case cPluginManager::HOOK_PLAYER_MOVING: return "OnPlayerMoving";
case cPluginManager::HOOK_PLAYER_PLACED_BLOCK: return "OnPlayerPlacedBlock";
case cPluginManager::HOOK_PLAYER_PLACING_BLOCK: return "OnPlayerPlacingBlock";
case cPluginManager::HOOK_PLAYER_RIGHT_CLICK: return "OnPlayerRightClick";