Skip to content

Commit

Permalink
Merge pull request #172 from dnqbob/fixt
Browse files Browse the repository at this point in the history
Fix the Offset, Zoffset used by TintedCellsLayer
  • Loading branch information
MustaphaTR authored Nov 3, 2024
2 parents 27a042f + 313ae13 commit 5feebda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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
5 changes: 4 additions & 1 deletion OpenRA.Mods.AS/Traits/World/TintedCellsLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ public class TintedCellsLayerInfo : TraitInfo
public readonly int FadeoutDelay = 150;

[Desc("Z offset of the visualization.")]
public readonly int ZOffset = 512;
public readonly int ZOffset = 0;

[Desc("Offset of the visualization.")]
public readonly WVec Offset = WVec.Zero;

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

0 comments on commit 5feebda

Please sign in to comment.