Fix explosion overlay bounds (#11074)

This commit is contained in:
Leon Friedrich
2022-09-06 17:27:29 +12:00
committed by GitHub
parent 1259898f6d
commit 75378b16aa
3 changed files with 6 additions and 6 deletions

View File

@@ -74,7 +74,7 @@ public sealed class ExplosionOverlay : Overlay
var xform = xforms.GetComponent(grid.GridEntityId);
var (_, _, worldMatrix, invWorldMatrix) = xform.GetWorldPositionRotationMatrixWithInv(xforms);
gridBounds = invWorldMatrix.TransformBox(worldBounds);
gridBounds = invWorldMatrix.TransformBox(worldBounds).Enlarged(grid.TileSize * 2);
drawHandle.SetTransform(worldMatrix);
DrawTiles(drawHandle, gridBounds, index, tiles, exp, grid.TileSize);
@@ -83,7 +83,7 @@ public sealed class ExplosionOverlay : Overlay
if (exp.SpaceTiles == null)
return;
gridBounds = Matrix3.Invert(exp.SpaceMatrix).TransformBox(worldBounds);
gridBounds = Matrix3.Invert(exp.SpaceMatrix).TransformBox(worldBounds).Enlarged(2);
drawHandle.SetTransform(exp.SpaceMatrix);
DrawTiles(drawHandle, gridBounds, index, exp.SpaceTiles, exp, exp.SpaceTileSize);