diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index 0ca15b6c8b..20b0ee56e2 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -636,9 +636,21 @@ namespace OpenRA.Mods.Common.UtilityCommands } if (engineVersion < 20170507) + { if (node.Key == "Offset" && parent.Key.StartsWith("WithHarvestOverlay", StringComparison.Ordinal)) RenameNodeKey(node, "LocalOffset"); + if (node.Key == "LocalOffset") + { + var orig = FieldLoader.GetValue(node.Key, node.Value.Value); + var scaled = orig.Select(o => FieldSaver.FormatValue(new WVec( + (int)Math.Round(Math.Sqrt(2) * o.X), + (int)Math.Round(Math.Sqrt(2) * o.Y), + (int)Math.Round(Math.Sqrt(2) * o.Z)))); + node.Value.Value = scaled.JoinWith(", "); + } + } + UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1); } diff --git a/mods/ts/rules/aircraft.yaml b/mods/ts/rules/aircraft.yaml index 3cc94840bb..4496979022 100644 --- a/mods/ts/rules/aircraft.yaml +++ b/mods/ts/rules/aircraft.yaml @@ -213,7 +213,7 @@ TRNSPORT: MoveIntoShroud: false Carryall: Voice: Move - LocalOffset: 0, 0, -224 + LocalOffset: 0,0,-317 Health: HP: 175 Armor: diff --git a/mods/ts/rules/civilian-infantry.yaml b/mods/ts/rules/civilian-infantry.yaml index 38440ec814..a81a9d781e 100644 --- a/mods/ts/rules/civilian-infantry.yaml +++ b/mods/ts/rules/civilian-infantry.yaml @@ -14,7 +14,7 @@ WEEDGUY: CrushSound: squishy2.aud Armament: Weapon: FireballLauncher - LocalOffset: 224,0,320 + LocalOffset: 317,0,453 TakeCover: ProneOffset: 128,0,-320 AttackFrontal: diff --git a/mods/ts/rules/civilian-vehicles.yaml b/mods/ts/rules/civilian-vehicles.yaml index 1cec06736f..04ea369403 100644 --- a/mods/ts/rules/civilian-vehicles.yaml +++ b/mods/ts/rules/civilian-vehicles.yaml @@ -22,12 +22,12 @@ TurnSpeed: 3 Armament@PRIMARY: Weapon: 120mmx - LocalOffset: 500,60,360, 500,-85,360 + LocalOffset: 707,85,509, 707,-120,509 MuzzleSequence: muzzle MuzzlePalette: effect-ignore-lighting Armament@SECONDARY: Weapon: MammothTusk - LocalOffset: 0,200,410, 0,-200,410 + LocalOffset: 0,283,580, 0,-283,580 AttackTurreted: Voice: Attack AutoTarget: diff --git a/mods/ts/rules/gdi-infantry.yaml b/mods/ts/rules/gdi-infantry.yaml index fb7cc827d7..fcbaf0f2a9 100644 --- a/mods/ts/rules/gdi-infantry.yaml +++ b/mods/ts/rules/gdi-infantry.yaml @@ -16,7 +16,7 @@ E2: Speed: 56 Armament: Weapon: Grenade - LocalOffset: 0,0,555 + LocalOffset: 0,0,785 FireDelay: 5 TakeCover: ProneOffset: 160,128,-555 @@ -204,7 +204,7 @@ GHOST: Range: 6c0 Armament: Weapon: LtRail - LocalOffset: 85,0,384 + LocalOffset: 120,0,543 TakeCover: ProneOffset: 256,32,-384 Crushable: diff --git a/mods/ts/rules/gdi-support.yaml b/mods/ts/rules/gdi-support.yaml index 40b7f38308..394cf82c1b 100644 --- a/mods/ts/rules/gdi-support.yaml +++ b/mods/ts/rules/gdi-support.yaml @@ -93,7 +93,7 @@ GACTWR: Armament@VULCPRIMARY: RequiresCondition: tower.vulcan Weapon: VulcanTower - LocalOffset: 416,85,960 + LocalOffset: 588,120,1358 MuzzleSequence: muzzle MuzzlePalette: effect-ignore-lighting MuzzleSplitFacings: 8 @@ -101,18 +101,18 @@ GACTWR: RequiresCondition: tower.vulcan Name: secondary Weapon: VulcanTower - LocalOffset: 416,-85,960 + LocalOffset: 588,-120,1358 MuzzleSequence: muzzle MuzzlePalette: effect-ignore-lighting MuzzleSplitFacings: 8 Armament@ROCKET: RequiresCondition: tower.rocket Weapon: RPGTower - LocalOffset: 192,-65,1056 + LocalOffset: 272,-92,1493 Armament@SAM: RequiresCondition: tower.sam Weapon: RedEye2 - LocalOffset: 384,0,1200 + LocalOffset: 543,0,1697 WithMuzzleOverlay: RequiresCondition: tower.vulcan WithIdleOverlay@LIGHTS: diff --git a/mods/ts/rules/gdi-vehicles.yaml b/mods/ts/rules/gdi-vehicles.yaml index 93956ea7af..b18dcfb515 100644 --- a/mods/ts/rules/gdi-vehicles.yaml +++ b/mods/ts/rules/gdi-vehicles.yaml @@ -85,7 +85,7 @@ HVR: MaxHeightDelta: 3 Armament: Weapon: HoverMissile - LocalOffset: 0,171,384, 0,-171,384 + LocalOffset: 0,242,543, 0,-242,543 Turreted: TurnSpeed: 7 Offset: -128,0,85 @@ -188,16 +188,16 @@ MMCH: MuzzlePalette: effect-ignore-lighting Recoil: 128 RecoilRecovery: 32 - LocalOffset: 640, 192, 832 + LocalOffset: 905,272,1177 WithMuzzleOverlay: RenderVoxels: WithVoxelBarrel: - LocalOffset: -64, 64, 256 + LocalOffset: -91,91,362 AutoTarget: Selectable: Bounds: 30, 42, 0, -8 Carryable: - LocalOffset: 0, 0, 408 + LocalOffset: 0,0,577 HMEC: Inherits: ^Tank @@ -231,17 +231,17 @@ HMEC: AutoTarget: Armament@MISSILES: Weapon: MammothTusk - LocalOffset: -172,-260,854, -172,260,854 + LocalOffset: -243,-368,1208, -243,368,1208 Armament@RAILGUN: Weapon: MechRailgun - LocalOffset: 260,-220,728, 260,220,728 + LocalOffset: 368,-311,1030, 368,311,1030 -WithVoxelBody: WithVoxelWalkerBody: TickRate: 1 Selectable: Bounds: 40, 40, 0, -8 Carryable: - LocalOffset: 0, 0, 360 + LocalOffset: 0,0,509 SONIC: Inherits: ^Tank @@ -272,7 +272,7 @@ SONIC: MaxHeightDelta: 3 Armament: Weapon: SonicZap - LocalOffset: -50,0,410 + LocalOffset: -71,0,580 AttackTurreted: Voice: Attack Turreted: diff --git a/mods/ts/rules/nod-infantry.yaml b/mods/ts/rules/nod-infantry.yaml index 0987582850..c20b90e5da 100644 --- a/mods/ts/rules/nod-infantry.yaml +++ b/mods/ts/rules/nod-infantry.yaml @@ -18,7 +18,7 @@ E3: Speed: 42 Armament@PRIMARY: Weapon: Bazooka - LocalOffset: 252,0,684 + LocalOffset: 356,0,967 TakeCover: ProneOffset: 52,64,-652 AttackFrontal: @@ -90,7 +90,7 @@ CYC2: Range: 7c0 Armament: Weapon: CyCannon - LocalOffset: 170,85,683 + LocalOffset: 240,120,966 AttackFrontal: Voice: Attack SelectionDecorations: diff --git a/mods/ts/rules/nod-support.yaml b/mods/ts/rules/nod-support.yaml index 9db185e407..7472ca1856 100644 --- a/mods/ts/rules/nod-support.yaml +++ b/mods/ts/rules/nod-support.yaml @@ -175,7 +175,7 @@ NALASR: AttackTurreted: Armament: Weapon: TurretLaserFire - LocalOffset: 352, 0, 224 + LocalOffset: 498,0,317 RenderVoxels: WithVoxelTurret: Power: @@ -211,7 +211,7 @@ NAOBEL: Range: 8c0 Armament: Weapon: ObeliskLaserFire - LocalOffset: 1400,210,800 + LocalOffset: 1980,297,1131 AttackCharges: ChargeLevel: 65 ChargingCondition: charging @@ -261,7 +261,7 @@ NASAM: Recoils: false Armament: Weapon: RedEye2 - LocalOffset: 384,0,576 + LocalOffset: 543,0,815 Power: Amount: -30 SelectionDecorations: diff --git a/mods/ts/rules/nod-vehicles.yaml b/mods/ts/rules/nod-vehicles.yaml index 5dffbc387b..cd06836030 100644 --- a/mods/ts/rules/nod-vehicles.yaml +++ b/mods/ts/rules/nod-vehicles.yaml @@ -24,7 +24,7 @@ BGGY: MaxHeightDelta: 3 Armament: Weapon: RaiderCannon - LocalOffset: 0,-43,384, 0,43,384 + LocalOffset: 0,-61,543, 0,61,543 MuzzleSequence: muzzle MuzzlePalette: effect-ignore-lighting MuzzleSplitFacings: 8 @@ -62,11 +62,11 @@ BIKE: Armament@PRIMARY: Weapon: BikeMissile RequiresCondition: !rank-elite - LocalOffset: -108,-144,360, -108,144,360 + LocalOffset: -153,-204,509, -153,204,509 Armament@ELITE: Weapon: HoverMissile RequiresCondition: rank-elite - LocalOffset: -108,-144,360, -108,144,360 + LocalOffset: -153,-204,509, -153,204,509 AttackFrontal: Voice: Attack AutoTarget: @@ -100,13 +100,13 @@ TTNK: RequiresCondition: undeployed Armament@PRIMARY: Weapon: 90mm - LocalOffset: 288,0,256 + LocalOffset: 407,0,362 RequiresCondition: !rank-elite MuzzleSequence: muzzle MuzzlePalette: effect-ignore-lighting Armament@ELITE: Weapon: 120mmx - LocalOffset: 288,0,256 + LocalOffset: 407,0,362 RequiresCondition: rank-elite MuzzleSequence: muzzle MuzzlePalette: effect-ignore-lighting @@ -142,7 +142,7 @@ TTNK: RealignDelay: -1 WithVoxelBarrel: Armament: deployed - LocalOffset: 128, 0, 256 + LocalOffset: 181,0,362 RequiresCondition: deployed WithVoxelTurret@deployed: Turret: deployed @@ -155,7 +155,7 @@ TTNK: Name: deployed Turret: deployed Weapon: 90mm - LocalOffset: 384,0,256 + LocalOffset: 543,0,362 RequiresCondition: !rank-elite MuzzleSequence: muzzle MuzzlePalette: effect-ignore-lighting @@ -163,7 +163,7 @@ TTNK: Name: deployed Turret: deployed Weapon: 120mmx - LocalOffset: 384,0,256 + LocalOffset: 543,0,362 RequiresCondition: rank-elite MuzzleSequence: muzzle MuzzlePalette: effect-ignore-lighting @@ -233,7 +233,7 @@ ART2: RealignDelay: -1 WithVoxelBarrel: Armament: deployed - LocalOffset: 0,0,-256 + LocalOffset: 0,0,-362 RequiresCondition: deployed WithVoxelTurret@deployed: Turret: deployed @@ -246,7 +246,7 @@ ART2: Name: deployed Turret: deployed Weapon: 155mm - LocalOffset: 811,0,0 + LocalOffset: 1147,0,0 RequiresCondition: deployed MuzzleSequence: muzzle MuzzlePalette: effect-ignore-lighting @@ -456,7 +456,7 @@ STNK: ValidDamageStates: Critical Armament: Weapon: Dragon - LocalOffset: 213,43,298, 213,-43,298 + LocalOffset: 301,61,421, 301,-61,421 AttackFrontal: Voice: Attack AutoTarget: diff --git a/mods/ts/rules/shared-support.yaml b/mods/ts/rules/shared-support.yaml index 2d7ea414dc..a95813c54e 100644 --- a/mods/ts/rules/shared-support.yaml +++ b/mods/ts/rules/shared-support.yaml @@ -29,7 +29,7 @@ NAPULS: AttackTurreted: Armament: Weapon: EMPulseCannon - LocalOffset: 150,0,1250 + LocalOffset: 212,0,1768 LocalYaw: 0,100 WithSpriteTurret: Sequence: turret diff --git a/mods/ts/rules/shared-vehicles.yaml b/mods/ts/rules/shared-vehicles.yaml index daec3800ff..a8b6048828 100644 --- a/mods/ts/rules/shared-vehicles.yaml +++ b/mods/ts/rules/shared-vehicles.yaml @@ -95,7 +95,7 @@ HARV: Explodes: Weapon: TiberiumExplosion WithHarvestOverlay: - LocalOffset: 384,0,0 + LocalOffset: 543,0,0 Palette: effect SelectionDecorations: VisualBounds: 36,36