fix #451
This commit is contained in:
@@ -62,14 +62,14 @@ namespace OpenRA.Mods.RA.Buildings
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Building : INotifyDamage, IResolveOrder, IOccupySpace
|
public class Building : INotifyDamage, IResolveOrder, IOccupySpace, INotifyCapture
|
||||||
{
|
{
|
||||||
readonly Actor self;
|
readonly Actor self;
|
||||||
public readonly BuildingInfo Info;
|
public readonly BuildingInfo Info;
|
||||||
[Sync]
|
[Sync]
|
||||||
readonly int2 topLeft;
|
readonly int2 topLeft;
|
||||||
|
|
||||||
readonly PowerManager PlayerPower;
|
PowerManager PlayerPower;
|
||||||
|
|
||||||
public int2 PxPosition { get { return ( 2 * topLeft + Info.Dimensions ) * Game.CellSize / 2; } }
|
public int2 PxPosition { get { return ( 2 * topLeft + Info.Dimensions ) * Game.CellSize / 2; } }
|
||||||
|
|
||||||
@@ -121,5 +121,10 @@ namespace OpenRA.Mods.RA.Buildings
|
|||||||
{
|
{
|
||||||
return FootprintUtils.UnpathableTiles( self.Info.Name, Info, TopLeft );
|
return FootprintUtils.UnpathableTiles( self.Info.Name, Info, TopLeft );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner)
|
||||||
|
{
|
||||||
|
PlayerPower = newOwner.PlayerActor.Trait<PowerManager>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user