(45158b939) Fixed item scale not being taken into account when drawing item assembly icons or when placing them

This commit is contained in:
Joonas Rikkonen
2019-04-26 11:17:11 +03:00
parent e3e9475c22
commit 1ffb969522
@@ -22,7 +22,7 @@ namespace Barotrauma
drawRect = new Rectangle( drawRect = new Rectangle(
(int)(drawRect.X * scale) + drawArea.Center.X, -((int)((drawRect.Y - drawRect.Height) * scale) + drawArea.Center.Y), (int)(drawRect.X * scale) + drawArea.Center.X, -((int)((drawRect.Y - drawRect.Height) * scale) + drawArea.Center.Y),
(int)(drawRect.Width * scale), (int)(drawRect.Height * scale)); (int)(drawRect.Width * scale), (int)(drawRect.Height * scale));
entity.First.DrawPlacing(spriteBatch, drawRect, scale); entity.First.DrawPlacing(spriteBatch, drawRect, entity.First.Scale * scale);
} }
} }
@@ -34,7 +34,7 @@ namespace Barotrauma
{ {
Rectangle drawRect = entity.Second; Rectangle drawRect = entity.Second;
drawRect.Location += Submarine.MouseToWorldGrid(cam, Submarine.MainSub).ToPoint(); drawRect.Location += Submarine.MouseToWorldGrid(cam, Submarine.MainSub).ToPoint();
entity.First.DrawPlacing(spriteBatch, drawRect); entity.First.DrawPlacing(spriteBatch, drawRect, entity.First.Scale);
} }
} }