1
0

Spectators added (#2852)

This commit is contained in:
bibo38
2016-10-12 14:38:45 +02:00
committed by Mattes D
parent 4e33569110
commit cb640ffea4
38 changed files with 396 additions and 36 deletions

View File

@@ -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: