Merge pull request #9828 from Arcitectus/RallyPoint.Reset.OnCapture

reset RallyPoint Location after building was captured. resolves #9163.
This commit is contained in:
Oliver Brakmann
2015-10-31 21:57:07 +01:00

View File

@@ -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<IOrderTargeter> Orders