From c5029e270dccb6f746ed375f2891e1bb08d4e543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20R=C3=A4tzel?= Date: Sat, 31 Oct 2015 20:31:08 +0100 Subject: [PATCH] reset RallyPoint Location after capture. resolves #9163. --- OpenRA.Mods.Common/Traits/Buildings/RallyPoint.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/Buildings/RallyPoint.cs b/OpenRA.Mods.Common/Traits/Buildings/RallyPoint.cs index 0c27c807c6..5908f30bc2 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/RallyPoint.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/RallyPoint.cs @@ -38,10 +38,15 @@ namespace OpenRA.Mods.Common.Traits public RallyPointInfo Info; public string PaletteName { get; private set; } + public void ResetLocation(Actor self) + { + Location = self.Location + Info.Offset; + } + public RallyPoint(Actor self, RallyPointInfo info) { Info = info; - Location = self.Location + info.Offset; + ResetLocation(self); PaletteName = info.IsPlayerPalette ? info.Palette + self.Owner.InternalName : info.Palette; self.World.Add(new RallyPointIndicator(self, this)); } @@ -50,6 +55,8 @@ namespace OpenRA.Mods.Common.Traits { if (Info.IsPlayerPalette) PaletteName = Info.Palette + newOwner.InternalName; + + ResetLocation(self); } public IEnumerable Orders