Skip to content

Commit 80f117d

Browse files
committed
Fix issue where SHP vehicles could overlap their turrets
1 parent c9618af commit 80f117d

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/TSMapEditor/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace TSMapEditor
44
{
55
public static class Constants
66
{
7-
public const string ReleaseVersion = "1.7.1";
7+
public const string ReleaseVersion = "1.7.2";
88

99
public static int CellSizeX = 48;
1010
public static int CellSizeY = 24;

src/TSMapEditor/Rendering/ObjectRenderers/UnitRenderer.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,12 @@ protected override DepthRectangle GetDepthFromPosition(Unit gameObject, Rectangl
5353
float max = Math.Max(depthTop, depthBottom);
5454

5555
// The unit's body is always drawn first, and at that point cachedDepth is -1f.
56-
// For the body, use the depth values computed here, otherwise use the largest depth recorded so far.
57-
if (cachedDepth.TopLeft < 0f)
56+
// For the shadow and body, use the depth values computed here, otherwise use the largest depth recorded so far.
57+
if (cachedDepth.TopLeft < max)
5858
{
5959
cachedDepth = new DepthRectangle(max);
6060
return new DepthRectangle(depthTop, depthBottom);
6161
}
62-
else if (cachedDepth.TopLeft < max)
63-
{
64-
cachedDepth = new DepthRectangle(max);
65-
}
6662

6763
return cachedDepth;
6864
}

0 commit comments

Comments
 (0)