diff options
author | bibo38 <bibo38@users.noreply.github.com> | 2016-10-12 14:38:45 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2016-10-12 14:38:45 +0200 |
commit | cb640ffea4a51a10db2e379ada8dc0487378ba09 (patch) | |
tree | 780ff243f439c9663b2f88e5df2805cc503f4f1d /src/UI | |
parent | Fixed cProjectileEntity double destroy bug (#3397) (diff) | |
download | cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.gz cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.bz2 cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.lz cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.xz cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.zst cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.zip |
Diffstat (limited to 'src/UI')
-rw-r--r-- | src/UI/SlotArea.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 2cef9b06d..8878bb900 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -58,6 +58,14 @@ void cSlotArea::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickA return; } + if (a_Player.IsGameModeSpectator()) + { + // Block the action of the player and make sure, the inventory doesn't get out of sync + a_Player.GetClientHandle()->SendInventorySlot(-1, -1, cItem()); // Reset the dragged item + SetSlot(a_SlotNum, a_Player, *GetSlot(a_SlotNum, a_Player)); // Update the current slot + return; + } + switch (a_ClickAction) { case caShiftLeftClick: |