diff options
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: |