From 9a64b8724cb63d768ccb41c47fe99807b6ed44cf Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 1 Aug 2015 00:31:40 +0100 Subject: [PATCH] Disable local -> world offset hack in TS. --- OpenRA.Game/Traits/BodyOrientation.cs | 7 +++++++ mods/ts/rules/defaults.yaml | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/OpenRA.Game/Traits/BodyOrientation.cs b/OpenRA.Game/Traits/BodyOrientation.cs index 4b5d4ad714..c043d164b6 100644 --- a/OpenRA.Game/Traits/BodyOrientation.cs +++ b/OpenRA.Game/Traits/BodyOrientation.cs @@ -20,8 +20,15 @@ namespace OpenRA.Traits [Desc("Camera pitch for rotation calculations")] public readonly WAngle CameraPitch = WAngle.FromDegrees(40); + [Desc("Fudge the coordinate system angles like the early games.")] + public readonly bool UseClassicPerspectiveFudge = true; + public WVec LocalToWorld(WVec vec) { + // Rotate by 90 degrees + if (!UseClassicPerspectiveFudge) + return new WVec(vec.Y, -vec.X, vec.Z); + // RA's 2d perspective doesn't correspond to an orthonormal 3D // coordinate system, so fudge the y axis to make things look good return new WVec(vec.Y, -CameraPitch.Sin() * vec.X / 1024, vec.Z); diff --git a/mods/ts/rules/defaults.yaml b/mods/ts/rules/defaults.yaml index 162cda1eff..f65c940e7b 100644 --- a/mods/ts/rules/defaults.yaml +++ b/mods/ts/rules/defaults.yaml @@ -4,6 +4,7 @@ CombatDebugOverlay: GivesExperience: BodyOrientation: + UseClassicPerspectiveFudge: False ScriptTriggers: UpgradeManager: Huntable: @@ -172,6 +173,7 @@ SellSounds: cashturn.aud UpdatesPlayerStatistics: BodyOrientation: + UseClassicPerspectiveFudge: False Demolishable: ScriptTriggers: UpgradeManager: @@ -519,6 +521,7 @@ RadarColorFromTerrain: Terrain: Tiberium BodyOrientation: + UseClassicPerspectiveFudge: False FrozenUnderFog: StartsRevealed: true SeedsResource: @@ -537,6 +540,7 @@ Dimensions: 1, 1 AppearsOnRadar: BodyOrientation: + UseClassicPerspectiveFudge: False Tooltip: Name: Tree @@ -551,6 +555,7 @@ Dimensions: 1, 1 AppearsOnRadar: BodyOrientation: + UseClassicPerspectiveFudge: False Tooltip: Name: Rock