Dragging bodies up stairs, attempt to fix legs going through torso, fixe GuiComponent.MouseOn getting stuck when switching to edit screen

This commit is contained in:
Regalis
2015-11-28 00:21:45 +02:00
parent c9cc94f701
commit 6f2db08be0
16 changed files with 226 additions and 114 deletions
@@ -306,8 +306,17 @@ namespace Barotrauma
float stairPosY = structure.StairDirection == Direction.Right ?
lowestLimb.Position.X - structure.Rect.X : structure.Rect.Width - (lowestLimb.Position.X - structure.Rect.X);
if (lowestLimb.Position.Y < structure.Rect.Y - structure.Rect.Height + stairPosY) return false;
if (character.IsDead)
{
if (lowestLimb.Position.Y < structure.Rect.Y - structure.Rect.Height + stairPosY - 10.0f) return false;
}
else
{
if (lowestLimb.Position.Y < structure.Rect.Y - structure.Rect.Height + stairPosY) return false;
}
if (targetMovement.Y < 0.5f)
{
if (inWater || lowestLimb.Position.Y < structure.Rect.Y - structure.Rect.Height + 50.0f)