From 57142fbb8dd22e1a45365dd8a8dd9e7bfc8d8f1c Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Wed, 15 May 2013 23:48:00 +1200 Subject: [PATCH] Convert indicator overlays to world coordinates. --- OpenRA.Mods.RA/Effects/GpsDot.cs | 3 +-- OpenRA.Mods.RA/Effects/PowerdownIndicator.cs | 4 ++-- OpenRA.Mods.RA/Effects/RepairIndicator.cs | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/OpenRA.Mods.RA/Effects/GpsDot.cs b/OpenRA.Mods.RA/Effects/GpsDot.cs index 821fbb8074..4f902ab399 100644 --- a/OpenRA.Mods.RA/Effects/GpsDot.cs +++ b/OpenRA.Mods.RA/Effects/GpsDot.cs @@ -82,9 +82,8 @@ namespace OpenRA.Mods.RA.Effects if (!show || self.Destroyed) yield break; - var p = self.CenterLocation; var palette = wr.Palette(info.IndicatorPalettePrefix+self.Owner.InternalName); - yield return new SpriteRenderable(anim.Image, p.ToFloat2(), palette, p.Y) + yield return new SpriteRenderable(anim.Image, self.CenterPosition, 0, palette, 1f) .WithScale(1.5f); } } diff --git a/OpenRA.Mods.RA/Effects/PowerdownIndicator.cs b/OpenRA.Mods.RA/Effects/PowerdownIndicator.cs index 27cc956cbf..1dcd292bb7 100644 --- a/OpenRA.Mods.RA/Effects/PowerdownIndicator.cs +++ b/OpenRA.Mods.RA/Effects/PowerdownIndicator.cs @@ -37,8 +37,8 @@ namespace OpenRA.Mods.RA.Effects public IEnumerable Render(WorldRenderer wr) { if (!a.Destroyed && a.Owner.IsAlliedWith(a.World.RenderPlayer)) - yield return new SpriteRenderable(anim.Image, a.CenterLocation.ToFloat2(), - wr.Palette("chrome"), (int)a.CenterLocation.Y); + yield return new SpriteRenderable(anim.Image, a.CenterPosition, 0, + wr.Palette("chrome"), 1f); } } } diff --git a/OpenRA.Mods.RA/Effects/RepairIndicator.cs b/OpenRA.Mods.RA/Effects/RepairIndicator.cs index 2948b9f497..0d2fa4e8e5 100755 --- a/OpenRA.Mods.RA/Effects/RepairIndicator.cs +++ b/OpenRA.Mods.RA/Effects/RepairIndicator.cs @@ -46,9 +46,8 @@ namespace OpenRA.Mods.RA.Effects { if (!building.Destroyed) { - yield return new SpriteRenderable(anim.Image, - building.CenterLocation.ToFloat2(), - wr.Palette(palettePrefix+player.InternalName), (int)building.CenterLocation.Y); + yield return new SpriteRenderable(anim.Image, building.CenterPosition, 0, + wr.Palette(palettePrefix+player.InternalName), 1f); } } }