diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-04-06 07:51:02 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-04-06 07:51:02 +0200 |
commit | 06e0921116d0f6892fdd03568f5c848ef1eb3d61 (patch) | |
tree | 2ea91e0dca574e2fa938e8e9aad306fee1a7e29b /src/ClientHandle.cpp | |
parent | Merge pull request #3124 from LogicParrot/noFall2 (diff) | |
parent | Minor improvements to player freeze (diff) | |
download | cuberite-06e0921116d0f6892fdd03568f5c848ef1eb3d61.tar cuberite-06e0921116d0f6892fdd03568f5c848ef1eb3d61.tar.gz cuberite-06e0921116d0f6892fdd03568f5c848ef1eb3d61.tar.bz2 cuberite-06e0921116d0f6892fdd03568f5c848ef1eb3d61.tar.lz cuberite-06e0921116d0f6892fdd03568f5c848ef1eb3d61.tar.xz cuberite-06e0921116d0f6892fdd03568f5c848ef1eb3d61.tar.zst cuberite-06e0921116d0f6892fdd03568f5c848ef1eb3d61.zip |
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r-- | src/ClientHandle.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index f14ec193e..cd261b338 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1039,7 +1039,7 @@ void cClientHandle::HandleLeftClick(int a_BlockX, int a_BlockY, int a_BlockZ, eB } cPluginManager * PlgMgr = cRoot::Get()->GetPluginManager(); - if (PlgMgr->CallHookPlayerLeftClick(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, static_cast<char>(a_Status))) + if (m_Player->IsFrozen() || PlgMgr->CallHookPlayerLeftClick(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, static_cast<char>(a_Status))) { // A plugin doesn't agree with the action, replace the block on the client and quit: m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player); @@ -1340,7 +1340,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e } cPluginManager * PlgMgr = cRoot::Get()->GetPluginManager(); - if (PlgMgr->CallHookPlayerRightClick(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ)) + if (m_Player->IsFrozen() || PlgMgr->CallHookPlayerRightClick(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ)) { // A plugin doesn't agree with the action, replace the block on the client and quit: if (AreRealCoords) @@ -1441,7 +1441,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e return; } m_Player->StartEating(); - if (PlgMgr->CallHookPlayerEating(*m_Player)) + if (m_Player->IsFrozen() || PlgMgr->CallHookPlayerEating(*m_Player)) { // A plugin won't let us eat, abort (send the proper packets to the client, too): m_Player->AbortEating(); @@ -1449,7 +1449,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e } else { - if (PlgMgr->CallHookPlayerUsingItem(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ)) + if (m_Player->IsFrozen() || PlgMgr->CallHookPlayerUsingItem(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ)) { // A plugin doesn't agree with using the item, abort return; |