Replace CenterLocationInit -> CenterPositionInit.
This commit is contained in:
@@ -80,12 +80,12 @@ namespace OpenRA
|
||||
public SubCell Value(World world) { return (SubCell)value; }
|
||||
}
|
||||
|
||||
public class CenterLocationInit : IActorInit<PPos>
|
||||
public class CenterPositionInit : IActorInit<WPos>
|
||||
{
|
||||
[FieldFromYamlKey] public readonly int2 value = int2.Zero;
|
||||
public CenterLocationInit() { }
|
||||
public CenterLocationInit(PPos init) { value = init.ToInt2(); }
|
||||
public PPos Value(World world) { return (PPos)value; }
|
||||
[FieldFromYamlKey] public readonly WPos value = WPos.Zero;
|
||||
public CenterPositionInit() { }
|
||||
public CenterPositionInit(WPos init) { value = init; }
|
||||
public WPos Value(World world) { return value; }
|
||||
}
|
||||
|
||||
public class OwnerInit : IActorInit<Player>
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.RA
|
||||
this.self = init.self;
|
||||
|
||||
TopLeft = init.Get<LocationInit, CPos>();
|
||||
CenterPosition = init.Contains<CenterLocationInit>() ? init.Get<CenterLocationInit, PPos>().ToWPos(0) : TopLeft.CenterPosition;
|
||||
CenterPosition = init.Contains<CenterPositionInit>() ? init.Get<CenterPositionInit, WPos>() : TopLeft.CenterPosition;
|
||||
Facing = init.Contains<FacingInit>() ? init.Get<FacingInit, int>() : 128;
|
||||
|
||||
var speed = init.Contains<HuskSpeedInit>() ? init.Get<HuskSpeedInit, int>() : 0;
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
new ParentActorInit(self),
|
||||
new LocationInit(self.Location),
|
||||
new CenterLocationInit(self.CenterLocation),
|
||||
new CenterPositionInit(self.CenterPosition),
|
||||
new OwnerInit(self.Owner),
|
||||
new SkipMakeAnimsInit()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user