Fixed items being dropped when attempting to place them in an itemcontainer slot that's on a normal inventory slot. Closes #200

This commit is contained in:
Joonas Rikkonen
2017-12-31 01:59:49 +02:00
parent 7d2b701784
commit c77c598cb6
3 changed files with 141 additions and 83 deletions
@@ -124,6 +124,8 @@ namespace Barotrauma
{
character.SelectedCharacter.Inventory.Update(deltaTime);
}
Inventory.UpdateDragging();
}
}
@@ -234,6 +236,11 @@ namespace Barotrauma
if (grabHoldButton.Visible) grabHoldButton.Draw(spriteBatch);
}
if (character.Inventory != null && !character.LockHands && character.Stun >= -0.1f)
{
Inventory.DrawDragging(spriteBatch);
}
if (character.FocusedCharacter != null && character.FocusedCharacter.CanBeSelected)
{
Vector2 startPos = character.DrawPosition + (character.FocusedCharacter.DrawPosition - character.DrawPosition) * 0.7f;