Skip to content

Commit

Permalink
Fix the Offset, Zoffset used by TintedCellsLayer
Browse files Browse the repository at this point in the history
  • Loading branch information
dnqbob committed Nov 3, 2024
1 parent daf9a0b commit a45b1a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OpenRA.Mods.AS/Graphics/TintedCell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void Render(WorldRenderer wr)
var ramp = ti != null ? ti.RampType : 0;

var corners = map.Grid.Ramps[ramp].Corners;
screen = corners.Select(c => wr.Screen3DPxPosition(wpos + c - new WVec(0, 0, map.Grid.Ramps[ramp].CenterHeightOffset) + new WVec(0, 0, ZOffset))).ToArray();
screen = corners.Select(c => wr.Screen3DPxPosition(wpos + c - new WVec(0, 0, map.Grid.Ramps[ramp].CenterHeightOffset) + layer.Info.Offset)).ToArray();
SetLevel(Level);
firstTime = false;
}
Expand Down
3 changes: 3 additions & 0 deletions OpenRA.Mods.AS/Traits/World/TintedCellsLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public class TintedCellsLayerInfo : TraitInfo
[Desc("Z offset of the visualization.")]
public readonly int ZOffset = 512;

[Desc("Offset of the visualization.")]
public readonly WVec Offset = new(0, 0, 512);

[Desc("Name of the layer.")]
public readonly string Name = "radioactivity";

Expand Down

0 comments on commit a45b1a6

Please sign in to comment.