From 27e4bbf1cbe30a40e604d6b5e3f0607eab14cdf1 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 21 Sep 2013 11:46:57 +1200 Subject: [PATCH] Replace CenterLocationInit -> CenterPositionInit. --- OpenRA.Game/ActorInitializer.cs | 10 +++++----- OpenRA.Mods.RA/Husk.cs | 2 +- OpenRA.Mods.RA/LeavesHusk.cs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/OpenRA.Game/ActorInitializer.cs b/OpenRA.Game/ActorInitializer.cs index f342c21d24..909c716b8e 100755 --- a/OpenRA.Game/ActorInitializer.cs +++ b/OpenRA.Game/ActorInitializer.cs @@ -80,12 +80,12 @@ namespace OpenRA public SubCell Value(World world) { return (SubCell)value; } } - public class CenterLocationInit : IActorInit + public class CenterPositionInit : IActorInit { - [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 diff --git a/OpenRA.Mods.RA/Husk.cs b/OpenRA.Mods.RA/Husk.cs index 2e9c0b0383..7efd9e19e4 100644 --- a/OpenRA.Mods.RA/Husk.cs +++ b/OpenRA.Mods.RA/Husk.cs @@ -42,7 +42,7 @@ namespace OpenRA.Mods.RA this.self = init.self; TopLeft = init.Get(); - CenterPosition = init.Contains() ? init.Get().ToWPos(0) : TopLeft.CenterPosition; + CenterPosition = init.Contains() ? init.Get() : TopLeft.CenterPosition; Facing = init.Contains() ? init.Get() : 128; var speed = init.Contains() ? init.Get() : 0; diff --git a/OpenRA.Mods.RA/LeavesHusk.cs b/OpenRA.Mods.RA/LeavesHusk.cs index c543da970c..f27171be06 100644 --- a/OpenRA.Mods.RA/LeavesHusk.cs +++ b/OpenRA.Mods.RA/LeavesHusk.cs @@ -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() };