diff --git a/Assets/Scripts/Controls/InventoryInterface.cs b/Assets/Scripts/Controls/InventoryInterface.cs index 155dbe5..292650a 100644 --- a/Assets/Scripts/Controls/InventoryInterface.cs +++ b/Assets/Scripts/Controls/InventoryInterface.cs @@ -182,11 +182,11 @@ namespace Cyber.Controls { // Grab was released, drop item here // Lerp things ItemGridCellMeshes[GrabbedItemIndex].transform.position = ItemGridCells[CurrentIndex].position; - ItemGridCellMeshes[CurrentIndex].transform.position = ItemGridCells[GrabbedItemIndex].position; Lerper.LerpTransformPosition(ItemGridCellMeshes[GrabbedItemIndex].transform, new Vector3(), 10f); Lerper.LerpTransformPosition(ItemGridCellMeshes[CurrentIndex].transform, new Vector3(), 10f); // Switch items + Inventory.Drive.SwitchSlots(GrabbedItemIndex, CurrentIndex); Client.Send(PktType.InventoryAction, Inventory.ActionHandler.BuildSlotSwitch(GrabbedItemIndex, CurrentIndex)); // Reset grabbing diff --git a/Assets/Scripts/Items/InventoryActionHandler.cs b/Assets/Scripts/Items/InventoryActionHandler.cs index e259f23..4fb2bf3 100644 --- a/Assets/Scripts/Items/InventoryActionHandler.cs +++ b/Assets/Scripts/Items/InventoryActionHandler.cs @@ -81,7 +81,9 @@ namespace Cyber.Items { } return false; case InventoryAction.Switch: - Inventory.Drive.SwitchSlots(intList[0], intList[1]); + if (!Client.IsRunning() || Client.GetConnectedPlayer().Character != Character) { + Inventory.Drive.SwitchSlots(intList[0], intList[1]); + } return true; } return false;