reset RallyPoint Location after capture. resolves #9163.
This commit is contained in:
@@ -38,10 +38,15 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
public RallyPointInfo Info;
|
public RallyPointInfo Info;
|
||||||
public string PaletteName { get; private set; }
|
public string PaletteName { get; private set; }
|
||||||
|
|
||||||
|
public void ResetLocation(Actor self)
|
||||||
|
{
|
||||||
|
Location = self.Location + Info.Offset;
|
||||||
|
}
|
||||||
|
|
||||||
public RallyPoint(Actor self, RallyPointInfo info)
|
public RallyPoint(Actor self, RallyPointInfo info)
|
||||||
{
|
{
|
||||||
Info = info;
|
Info = info;
|
||||||
Location = self.Location + info.Offset;
|
ResetLocation(self);
|
||||||
PaletteName = info.IsPlayerPalette ? info.Palette + self.Owner.InternalName : info.Palette;
|
PaletteName = info.IsPlayerPalette ? info.Palette + self.Owner.InternalName : info.Palette;
|
||||||
self.World.Add(new RallyPointIndicator(self, this));
|
self.World.Add(new RallyPointIndicator(self, this));
|
||||||
}
|
}
|
||||||
@@ -50,6 +55,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
{
|
{
|
||||||
if (Info.IsPlayerPalette)
|
if (Info.IsPlayerPalette)
|
||||||
PaletteName = Info.Palette + newOwner.InternalName;
|
PaletteName = Info.Palette + newOwner.InternalName;
|
||||||
|
|
||||||
|
ResetLocation(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<IOrderTargeter> Orders
|
public IEnumerable<IOrderTargeter> Orders
|
||||||
|
|||||||
Reference in New Issue
Block a user