Unstable 0.15.13.0

This commit is contained in:
Markus Isberg
2021-11-01 23:58:29 +09:00
parent a43b540d4b
commit 935fc112bc
13 changed files with 39 additions and 11 deletions
@@ -74,7 +74,7 @@ namespace Barotrauma.Items.Components
{
Matrix bodyTransform = Matrix.CreateRotationZ(item.body == null ? MathHelper.ToRadians(item.Rotation) : item.body.Rotation);
Vector2 flippedPos = barrelPos;
if (item.body.Dir < 0.0f) { flippedPos.X = -flippedPos.X; }
if (item.body != null && item.body.Dir < 0.0f) { flippedPos.X = -flippedPos.X; }
return Vector2.Transform(flippedPos, bodyTransform) * item.Scale;
}
}
@@ -75,6 +75,7 @@ namespace Barotrauma.Items.Components
float closestDist = float.PositiveInfinity;
foreach (Item targetItem in Item.ItemList)
{
if (targetItem.NonInteractable || targetItem.NonPlayerTeamInteractable || targetItem.HiddenInGame) { continue; }
if (OnlyInOwnSub)
{
if (targetItem.Submarine != item.Submarine) { continue; }