Merge pull request #8862 from pchote/fix-rotation-hack

Disable legacy coordinate hack in TS.
This commit is contained in:
Pavel Penev
2015-08-01 23:04:08 +03:00
4 changed files with 16 additions and 4 deletions

View File

@@ -20,8 +20,15 @@ namespace OpenRA.Traits
[Desc("Camera pitch for rotation calculations")] [Desc("Camera pitch for rotation calculations")]
public readonly WAngle CameraPitch = WAngle.FromDegrees(40); 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) 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 // RA's 2d perspective doesn't correspond to an orthonormal 3D
// coordinate system, so fudge the y axis to make things look good // coordinate system, so fudge the y axis to make things look good
return new WVec(vec.Y, -CameraPitch.Sin() * vec.X / 1024, vec.Z); return new WVec(vec.Y, -CameraPitch.Sin() * vec.X / 1024, vec.Z);

View File

@@ -18,11 +18,11 @@
ROT: 3 ROT: 3
Armament@PRIMARY: Armament@PRIMARY:
Weapon: 120mmx Weapon: 120mmx
LocalOffset: 640,85,384, 640,-85,384 LocalOffset: 500,60,360, 500,-85,360
MuzzleSequence: muzzle MuzzleSequence: muzzle
Armament@SECONDARY: Armament@SECONDARY:
Weapon: MammothTusk Weapon: MammothTusk
LocalOffset: 0,256,426, 0,-256,426 LocalOffset: 0,200,410, 0,-200,410
AttackTurreted: AttackTurreted:
Voice: Attack Voice: Attack
AutoTarget: AutoTarget:

View File

@@ -4,6 +4,7 @@
CombatDebugOverlay: CombatDebugOverlay:
GivesExperience: GivesExperience:
BodyOrientation: BodyOrientation:
UseClassicPerspectiveFudge: False
ScriptTriggers: ScriptTriggers:
UpgradeManager: UpgradeManager:
Huntable: Huntable:
@@ -171,6 +172,7 @@
SellSounds: cashturn.aud SellSounds: cashturn.aud
UpdatesPlayerStatistics: UpdatesPlayerStatistics:
BodyOrientation: BodyOrientation:
UseClassicPerspectiveFudge: False
Demolishable: Demolishable:
ScriptTriggers: ScriptTriggers:
UpgradeManager: UpgradeManager:
@@ -516,6 +518,7 @@
RadarColorFromTerrain: RadarColorFromTerrain:
Terrain: Tiberium Terrain: Tiberium
BodyOrientation: BodyOrientation:
UseClassicPerspectiveFudge: False
FrozenUnderFog: FrozenUnderFog:
StartsRevealed: true StartsRevealed: true
SeedsResource: SeedsResource:
@@ -534,6 +537,7 @@
Dimensions: 1, 1 Dimensions: 1, 1
AppearsOnRadar: AppearsOnRadar:
BodyOrientation: BodyOrientation:
UseClassicPerspectiveFudge: False
Tooltip: Tooltip:
Name: Tree Name: Tree
@@ -548,6 +552,7 @@
Dimensions: 1, 1 Dimensions: 1, 1
AppearsOnRadar: AppearsOnRadar:
BodyOrientation: BodyOrientation:
UseClassicPerspectiveFudge: False
Tooltip: Tooltip:
Name: Rock Name: Rock

View File

@@ -182,10 +182,10 @@ HMEC:
AutoTarget: AutoTarget:
Armament@MISSILES: Armament@MISSILES:
Weapon: MammothTusk Weapon: MammothTusk
LocalOffset: -128,-384,980, -128,384,980 LocalOffset: -172,-260,854, -172,260,854
Armament@RAILGUN: Armament@RAILGUN:
Weapon: MechRailgun Weapon: MechRailgun
LocalOffset: 640,-384,980, 640,384,980 LocalOffset: 260,-220,728, 260,220,728
-WithVoxelBody: -WithVoxelBody:
WithVoxelWalkerBody: WithVoxelWalkerBody:
TickRate: 1 TickRate: 1