Merge pull request #10562 from pchote/classic-facing-fudge

Implement ClassicFacingFudge for fudging classic facings.
This commit is contained in:
reaperrr
2016-01-28 23:45:48 +01:00
21 changed files with 211 additions and 32 deletions

View File

@@ -75,7 +75,7 @@ namespace OpenRA.Mods.Common.Graphics
{ {
static readonly WDist DefaultShadowSpriteZOffset = new WDist(-5); static readonly WDist DefaultShadowSpriteZOffset = new WDist(-5);
readonly Sprite[] sprites; readonly Sprite[] sprites;
readonly bool reverseFacings, transpose; readonly bool reverseFacings, transpose, useClassicFacingFudge;
protected readonly ISpriteSequenceLoader Loader; protected readonly ISpriteSequenceLoader Loader;
@@ -129,6 +129,8 @@ namespace OpenRA.Mods.Common.Graphics
Tick = LoadField(d, "Tick", 40); Tick = LoadField(d, "Tick", 40);
transpose = LoadField(d, "Transpose", false); transpose = LoadField(d, "Transpose", false);
Frames = LoadField<int[]>(d, "Frames", null); Frames = LoadField<int[]>(d, "Frames", null);
useClassicFacingFudge = LoadField(d, "UseClassicFacingFudge", false);
var flipX = LoadField(d, "FlipX", false); var flipX = LoadField(d, "FlipX", false);
var flipY = LoadField(d, "FlipY", false); var flipY = LoadField(d, "FlipY", false);
@@ -139,6 +141,11 @@ namespace OpenRA.Mods.Common.Graphics
Facings = -Facings; Facings = -Facings;
} }
if (useClassicFacingFudge && Facings != 32)
throw new InvalidOperationException(
"{0}: Sequence {1}.{2}: UseClassicFacingFudge is only valid for 32 facings"
.F(info.Nodes[0].Location, sequence, animation));
var offset = LoadField(d, "Offset", float2.Zero); var offset = LoadField(d, "Offset", float2.Zero);
var blendMode = LoadField(d, "BlendMode", BlendMode.Alpha); var blendMode = LoadField(d, "BlendMode", BlendMode.Alpha);
@@ -237,8 +244,7 @@ namespace OpenRA.Mods.Common.Graphics
protected virtual Sprite GetSprite(int start, int frame, int facing) protected virtual Sprite GetSprite(int start, int frame, int facing)
{ {
var f = Util.QuantizeFacing(facing, Facings); var f = Util.QuantizeFacing(facing, Facings, useClassicFacingFudge);
if (reverseFacings) if (reverseFacings)
f = (Facings - f) % Facings; f = (Facings - f) % Facings;

View File

@@ -253,7 +253,10 @@ namespace OpenRA.Mods.Common.Traits
var localOffset = b.Offset + new WVec(-Recoil, WDist.Zero, WDist.Zero); var localOffset = b.Offset + new WVec(-Recoil, WDist.Zero, WDist.Zero);
if (turret != null) if (turret != null)
{ {
var turretOrientation = coords.QuantizeOrientation(self, turret.LocalOrientation(self)); // WorldOrientation is quantized to satisfy the *Fudges.
// Need to then convert back to a pseudo-local coordinate space, apply offsets,
// then rotate back at the end
var turretOrientation = turret.WorldOrientation(self) - bodyOrientation;
localOffset = localOffset.Rotate(turretOrientation); localOffset = localOffset.Rotate(turretOrientation);
localOffset += turret.Offset; localOffset += turret.Offset;
} }
@@ -263,10 +266,10 @@ namespace OpenRA.Mods.Common.Traits
public WRot MuzzleOrientation(Actor self, Barrel b) public WRot MuzzleOrientation(Actor self, Barrel b)
{ {
var orientation = self.Orientation + WRot.FromYaw(b.Yaw); var orientation = turret != null ? turret.WorldOrientation(self) :
if (turret != null) coords.QuantizeOrientation(self, self.Orientation);
orientation += turret.LocalOrientation(self);
return orientation; return orientation + WRot.FromYaw(b.Yaw);
} }
public Actor Actor { get { return self; } } public Actor Actor { get { return self; } }

View File

@@ -24,6 +24,9 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Fudge the coordinate system angles like the early games.")] [Desc("Fudge the coordinate system angles like the early games.")]
public readonly bool UseClassicPerspectiveFudge = true; public readonly bool UseClassicPerspectiveFudge = true;
[Desc("Fudge the coordinate system angles like the early games.")]
public readonly bool UseClassicFacingFudge = false;
public WVec LocalToWorld(WVec vec) public WVec LocalToWorld(WVec vec)
{ {
// Rotate by 90 degrees // Rotate by 90 degrees
@@ -50,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits
public int QuantizeFacing(int facing, int facings) public int QuantizeFacing(int facing, int facings)
{ {
return Util.QuantizeFacing(facing, facings) * (256 / facings); return Util.QuantizeFacing(facing, facings, UseClassicFacingFudge) * (256 / facings);
} }
public object Create(ActorInitializer init) { return new BodyOrientation(init, this); } public object Create(ActorInitializer init) { return new BodyOrientation(init, this); }

View File

@@ -90,9 +90,9 @@ namespace OpenRA.Mods.Common.Traits
{ {
var localOffset = Info.LocalOffset + new WVec(-armament.Recoil, WDist.Zero, WDist.Zero); var localOffset = Info.LocalOffset + new WVec(-armament.Recoil, WDist.Zero, WDist.Zero);
var turretOffset = turreted != null ? turreted.Position(self) : WVec.Zero; var turretOffset = turreted != null ? turreted.Position(self) : WVec.Zero;
var turretOrientation = turreted != null ? turreted.LocalOrientation(self) : WRot.Zero;
var quantizedBody = body.QuantizeOrientation(self, self.Orientation); var quantizedBody = body.QuantizeOrientation(self, self.Orientation);
var turretOrientation = turreted != null ? turreted.WorldOrientation(self) - quantizedBody : WRot.Zero;
var quantizedTurret = body.QuantizeOrientation(self, turretOrientation); var quantizedTurret = body.QuantizeOrientation(self, turretOrientation);
return turretOffset + body.LocalToWorld(localOffset.Rotate(quantizedTurret).Rotate(quantizedBody)); return turretOffset + body.LocalToWorld(localOffset.Rotate(quantizedTurret).Rotate(quantizedBody));
} }
@@ -101,7 +101,7 @@ namespace OpenRA.Mods.Common.Traits
{ {
var b = self.Orientation; var b = self.Orientation;
var qb = body.QuantizeOrientation(self, b); var qb = body.QuantizeOrientation(self, b);
yield return turreted.LocalOrientation(self) + WRot.FromYaw(b.Yaw - qb.Yaw); yield return turreted.WorldOrientation(self) - qb + WRot.FromYaw(b.Yaw - qb.Yaw);
yield return qb; yield return qb;
} }
} }

View File

@@ -98,9 +98,8 @@ namespace OpenRA.Mods.Common.Traits
var recoil = arms.Aggregate(WDist.Zero, (a, b) => a + b.Recoil); var recoil = arms.Aggregate(WDist.Zero, (a, b) => a + b.Recoil);
var localOffset = new WVec(-recoil, WDist.Zero, WDist.Zero); var localOffset = new WVec(-recoil, WDist.Zero, WDist.Zero);
var bodyOrientation = body.QuantizeOrientation(self, self.Orientation); var quantizedWorldTurret = t.WorldOrientation(self);
var turretOrientation = body.QuantizeOrientation(self, t.LocalOrientation(self)); return t.Position(self) + body.LocalToWorld(localOffset.Rotate(quantizedWorldTurret));
return t.Position(self) + body.LocalToWorld(localOffset.Rotate(turretOrientation).Rotate(bodyOrientation));
} }
public string NormalizeSequence(Actor self, string sequence) public string NormalizeSequence(Actor self, string sequence)

View File

@@ -84,20 +84,20 @@ namespace OpenRA.Mods.Common.Traits
WVec BarrelOffset() WVec BarrelOffset()
{ {
var b = self.Orientation;
var qb = body.QuantizeOrientation(self, b);
var localOffset = Info.LocalOffset + new WVec(-armament.Recoil, WDist.Zero, WDist.Zero); var localOffset = Info.LocalOffset + new WVec(-armament.Recoil, WDist.Zero, WDist.Zero);
var turretLocalOffset = turreted != null ? turreted.Offset : WVec.Zero; var turretLocalOffset = turreted != null ? turreted.Offset : WVec.Zero;
var turretOrientation = turreted != null ? turreted.LocalOrientation(self) : WRot.Zero; var turretOrientation = turreted != null ? turreted.WorldOrientation(self) - b + WRot.FromYaw(b.Yaw - qb.Yaw) : WRot.Zero;
var quantizedBody = body.QuantizeOrientation(self, self.Orientation); return body.LocalToWorld((turretLocalOffset + localOffset.Rotate(turretOrientation)).Rotate(qb));
var quantizedTurret = body.QuantizeOrientation(self, turretOrientation);
return body.LocalToWorld((turretLocalOffset + localOffset.Rotate(quantizedTurret)).Rotate(quantizedBody));
} }
IEnumerable<WRot> BarrelRotation() IEnumerable<WRot> BarrelRotation()
{ {
var b = self.Orientation; var b = self.Orientation;
var qb = body.QuantizeOrientation(self, b); var qb = body.QuantizeOrientation(self, b);
yield return turreted.LocalOrientation(self) + WRot.FromYaw(b.Yaw - qb.Yaw); yield return turreted.WorldOrientation(self) - b + WRot.FromYaw(b.Yaw - qb.Yaw);
yield return qb; yield return qb;
} }

View File

@@ -73,7 +73,7 @@ namespace OpenRA.Mods.Common.Traits
{ {
var b = self.Orientation; var b = self.Orientation;
var qb = body.QuantizeOrientation(self, b); var qb = body.QuantizeOrientation(self, b);
yield return turreted.LocalOrientation(self) + WRot.FromYaw(b.Yaw - qb.Yaw); yield return turreted.WorldOrientation(self) - b + WRot.FromYaw(b.Yaw - qb.Yaw);
yield return qb; yield return qb;
} }

View File

@@ -122,18 +122,18 @@ namespace OpenRA.Mods.Common.Traits
return body.LocalToWorld(Offset.Rotate(bodyOrientation)); return body.LocalToWorld(Offset.Rotate(bodyOrientation));
} }
// Orientation in unit-space // Orientation in world-space
public WRot LocalOrientation(Actor self) public WRot WorldOrientation(Actor self)
{ {
// Hack: turretFacing is relative to the world, so subtract the body yaw // Hack: turretFacing is relative to the world, so subtract the body yaw
var local = WRot.FromYaw(WAngle.FromFacing(TurretFacing) - self.Orientation.Yaw); var world = WRot.FromYaw(WAngle.FromFacing(TurretFacing));
if (QuantizedFacings == 0) if (QuantizedFacings == 0)
return local; return world;
// Quantize orientation to match a rendered sprite // Quantize orientation to match a rendered sprite
// Implies no pitch or yaw // Implies no pitch or yaw
var facing = body.QuantizeFacing(local.Yaw.Angle / 4, QuantizedFacings); var facing = body.QuantizeFacing(world.Yaw.Angle / 4, QuantizedFacings);
return new WRot(WAngle.Zero, WAngle.Zero, WAngle.FromFacing(facing)); return new WRot(WAngle.Zero, WAngle.Zero, WAngle.FromFacing(facing));
} }

View File

@@ -48,6 +48,30 @@ namespace OpenRA.Mods.Common
return a / step; return a / step;
} }
public static int QuantizeFacing(int facing, int numFrames, bool useClassicFacingFudge)
{
if (!useClassicFacingFudge || numFrames != 32)
return Util.QuantizeFacing(facing, numFrames);
// TD and RA divided the facing artwork into 3 frames from (north|south) to (north|south)-(east|west)
// and then 5 frames from (north|south)-(east|west) to (east|west)
var quadrant = ((facing + 31) & 0xFF) / 64;
if (quadrant == 0 || quadrant == 2)
{
var frame = Util.QuantizeFacing(facing, 24);
if (frame > 18)
return frame + 6;
if (frame > 4)
return frame + 3;
return frame;
}
else
{
var frame = Util.QuantizeFacing(facing, 40);
return frame < 20 ? frame - 3 : frame - 8;
}
}
public static WPos BetweenCells(World w, CPos from, CPos to) public static WPos BetweenCells(World w, CPos from, CPos to)
{ {
return WPos.Lerp(w.Map.CenterOfCell(from), w.Map.CenterOfCell(to), 1, 2); return WPos.Lerp(w.Map.CenterOfCell(from), w.Map.CenterOfCell(to), 1, 2);

View File

@@ -13,7 +13,7 @@ TRAN:
LandWhenIdle: true LandWhenIdle: true
ROT: 5 ROT: 5
Speed: 140 Speed: 140
InitialFacing: 0 InitialFacing: 224
LandableTerrainTypes: Clear,Rough,Road,Ore,Beach,Tiberium,BlueTiberium LandableTerrainTypes: Clear,Rough,Road,Ore,Beach,Tiberium,BlueTiberium
AltitudeVelocity: 0c100 AltitudeVelocity: 0c100
Health: Health:
@@ -54,6 +54,7 @@ HELI:
Queue: Aircraft.Nod Queue: Aircraft.Nod
Aircraft: Aircraft:
RearmBuildings: hpad RearmBuildings: hpad
InitialFacing: 224
ROT: 4 ROT: 4
Speed: 186 Speed: 186
Health: Health:
@@ -105,6 +106,7 @@ ORCA:
Queue: Aircraft.GDI Queue: Aircraft.GDI
Aircraft: Aircraft:
RearmBuildings: hpad RearmBuildings: hpad
InitialFacing: 224
ROT: 4 ROT: 4
Speed: 186 Speed: 186
Health: Health:

View File

@@ -98,6 +98,8 @@
MustBeDestroyed: MustBeDestroyed:
Voiced: Voiced:
VoiceSet: VehicleVoice VoiceSet: VehicleVoice
BodyOrientation:
UseClassicFacingFudge: True
^Tank: ^Tank:
Inherits: ^Vehicle Inherits: ^Vehicle
@@ -157,6 +159,8 @@
MustBeDestroyed: MustBeDestroyed:
Voiced: Voiced:
VoiceSet: VehicleVoice VoiceSet: VehicleVoice
BodyOrientation:
UseClassicFacingFudge: True
^Infantry: ^Infantry:
Inherits@1: ^ExistsInWorld Inherits@1: ^ExistsInWorld
@@ -674,6 +678,8 @@
Explodes: Explodes:
Weapon: UnitExplodeSmall Weapon: UnitExplodeSmall
EmptyWeapon: UnitExplodeSmall EmptyWeapon: UnitExplodeSmall
BodyOrientation:
UseClassicFacingFudge: True
^HelicopterHusk: ^HelicopterHusk:
Inherits: ^CommonHuskDefaults Inherits: ^CommonHuskDefaults
@@ -687,6 +693,8 @@
Explosion: HeliCrash Explosion: HeliCrash
Tooltip: Tooltip:
GenericName: Destroyed Helicopter GenericName: Destroyed Helicopter
BodyOrientation:
UseClassicFacingFudge: True
^Bridge: ^Bridge:
AlwaysVisible: AlwaysVisible:

View File

@@ -658,7 +658,7 @@ GUN:
HasMinibib: Yes HasMinibib: Yes
Turreted: Turreted:
ROT: 12 ROT: 12
InitialFacing: 50 InitialFacing: 56
-WithSpriteBody: -WithSpriteBody:
WithTurretedSpriteBody: WithTurretedSpriteBody:
Armament: Armament:
@@ -672,6 +672,8 @@ GUN:
Range: 3c0 Range: 3c0
Power: Power:
Amount: -20 Amount: -20
BodyOrientation:
UseClassicFacingFudge: True
SAM: SAM:
Inherits: ^Defense Inherits: ^Defense
@@ -712,6 +714,8 @@ SAM:
-RenderDetectionCircle: -RenderDetectionCircle:
Power: Power:
Amount: -20 Amount: -20
BodyOrientation:
UseClassicFacingFudge: True
OBLI: OBLI:
Inherits: ^Defense Inherits: ^Defense

View File

@@ -1,11 +1,13 @@
c17: c17:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
icon: c17icnh icon: c17icnh
tran: tran:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
rotor: lrotor rotor: lrotor
Length: 4 Length: 4
rotor2: rrotor rotor2: rrotor
@@ -27,6 +29,7 @@ tran:
heli: heli:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
rotor: lrotor rotor: lrotor
Length: 4 Length: 4
slow-rotor: lrotor slow-rotor: lrotor
@@ -41,6 +44,7 @@ heli:
orca: orca:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
move: move:
Start: 32 Start: 32
Facings: 32 Facings: 32
@@ -50,6 +54,7 @@ orca:
a10: a10:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: minigun muzzle: minigun
Length: 6 Length: 6
Facings: 8 Facings: 8

View File

@@ -414,15 +414,19 @@ wood:
gun: gun:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
recoil: recoil:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
damaged-idle: damaged-idle:
Start: 64 Start: 64
Facings: 32 Facings: 32
UseClassicFacingFudge: True
damaged-recoil: damaged-recoil:
Start: 96 Start: 96
Facings: 32 Facings: 32
UseClassicFacingFudge: True
make: gunmake make: gunmake
Length: * Length: *
Tick: 80 Tick: 80
@@ -449,6 +453,7 @@ sam:
idle: idle:
Start: 17 Start: 17
Facings: 32 Facings: 32
UseClassicFacingFudge: True
closing: closing:
Start: 50 Start: 50
Length: 14 Length: 14
@@ -462,6 +467,7 @@ sam:
damaged-idle: damaged-idle:
Start: 81 Start: 81
Facings: 32 Facings: 32
UseClassicFacingFudge: True
damaged-closing: damaged-closing:
Start: 114 Start: 114
Length: 14 Length: 14

View File

@@ -1,17 +1,20 @@
mcv: mcv:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
icon: mcvicnh.tem icon: mcvicnh.tem
AddExtension: False AddExtension: False
mcv.destroyed: mcv.destroyed:
idle: mcv idle: mcv
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
harv: harv:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
harvest: harvest:
Start: 32 Start: 32
Length: 4 Length: 4
@@ -27,14 +30,17 @@ harv:
harv.destroyed: harv.destroyed:
idle: harv idle: harv
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
bggy: bggy:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: minigun muzzle: minigun
Length: 6 Length: 6
Facings: 8 Facings: 8
@@ -44,18 +50,22 @@ bggy:
bggy.destroyed: bggy.destroyed:
idle: bggy idle: bggy
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
turret: bggy turret: bggy
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
mtnk: mtnk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: gunfire2 muzzle: gunfire2
Length: * Length: *
icon: mtnkicnh.tem icon: mtnkicnh.tem
@@ -64,18 +74,22 @@ mtnk:
mtnk.destroyed: mtnk.destroyed:
idle: mtnk idle: mtnk
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
turret: mtnk turret: mtnk
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
ltnk: ltnk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: gunfire2 muzzle: gunfire2
Length: * Length: *
icon: ltnkicnh.tem icon: ltnkicnh.tem
@@ -84,18 +98,22 @@ ltnk:
ltnk.destroyed: ltnk.destroyed:
idle: ltnk idle: ltnk
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
turret: ltnk turret: ltnk
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
htnk: htnk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: gunfire2 muzzle: gunfire2
Length: * Length: *
icon: htnkicnh.tem icon: htnkicnh.tem
@@ -104,18 +122,22 @@ htnk:
htnk.destroyed: htnk.destroyed:
idle: htnk idle: htnk
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
turret: htnk turret: htnk
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
jeep: jeep:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: minigun muzzle: minigun
Length: 6 Length: 6
Facings: 8 Facings: 8
@@ -125,26 +147,31 @@ jeep:
jeep.destroyed: jeep.destroyed:
idle: jeep idle: jeep
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
turret: jeep turret: jeep
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
bike: bike:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
icon: bikeicnh.tem icon: bikeicnh.tem
AddExtension: False AddExtension: False
bike.destroyed: bike.destroyed:
idle: bike idle: bike
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
ftnk: ftnk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: muzzle:
Combine: Combine:
flame-n: flame-n:
@@ -179,11 +206,13 @@ ftnk:
ftnk.destroyed: ftnk.destroyed:
idle: ftnk idle: ftnk
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
mhq: mhq:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
spinner: spinner:
Start: 32 Start: 32
Length: 32 Length: 32
@@ -192,68 +221,84 @@ mhq:
msam: msam:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
empty-aim: empty-aim:
Start: 64 Start: 64
Facings: 32 Facings: 32
UseClassicFacingFudge: True
aim: aim:
Start: 64 Start: 64
Facings: 32 Facings: 32
UseClassicFacingFudge: True
icon: msamicnh.tem icon: msamicnh.tem
AddExtension: False AddExtension: False
msam.destroyed: msam.destroyed:
idle: msam idle: msam
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
turret: msam turret: msam
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
mlrs: mlrs:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret2: turret2:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret1: turret1:
Start: 64 Start: 64
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret0: turret0:
Start: 96 Start: 96
Facings: 32 Facings: 32
UseClassicFacingFudge: True
icon: mlrsicnh.tem icon: mlrsicnh.tem
AddExtension: False AddExtension: False
mlrs.destroyed: mlrs.destroyed:
idle: mlrs idle: mlrs
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
turret: mlrs turret: mlrs
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
stnk: stnk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
icon: stnkicnh.tem icon: stnkicnh.tem
AddExtension: False AddExtension: False
stnk.destroyed: stnk.destroyed:
idle: stnk idle: stnk
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
arty: arty:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: gunfire2 muzzle: gunfire2
Length: * Length: *
icon: artyicnh.tem icon: artyicnh.tem
@@ -262,11 +307,13 @@ arty:
arty.destroyed: arty.destroyed:
idle: arty idle: arty
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
apc: apc:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: apctur turret: apctur
Facings: 32 Facings: 32
muzzle: apcmuz muzzle: apcmuz
@@ -284,6 +331,7 @@ apc:
apc.destroyed: apc.destroyed:
idle: apc idle: apc
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
turret: apctur turret: apctur
Facings: 32 Facings: 32

View File

@@ -207,7 +207,7 @@ TRAN:
Range: 10c0 Range: 10c0
Type: CenterPosition Type: CenterPosition
Aircraft: Aircraft:
InitialFacing: 0 InitialFacing: 224
ROT: 5 ROT: 5
Speed: 112 Speed: 112
LandableTerrainTypes: Clear,Rough,Road,Ore,Beach LandableTerrainTypes: Clear,Rough,Road,Ore,Beach
@@ -256,7 +256,7 @@ HELI:
FacingTolerance: 20 FacingTolerance: 20
Aircraft: Aircraft:
LandWhenIdle: false LandWhenIdle: false
InitialFacing: 20 InitialFacing: 224
ROT: 4 ROT: 4
Speed: 149 Speed: 149
AutoTarget: AutoTarget:
@@ -307,7 +307,7 @@ HIND:
FacingTolerance: 20 FacingTolerance: 20
Aircraft: Aircraft:
LandWhenIdle: false LandWhenIdle: false
InitialFacing: 20 InitialFacing: 224
ROT: 4 ROT: 4
Speed: 112 Speed: 112
AutoTarget: AutoTarget:

View File

@@ -139,6 +139,8 @@
Sequence: idle Sequence: idle
OpeningSequence: open OpeningSequence: open
Offset: 0,0,200 Offset: 0,0,200
BodyOrientation:
UseClassicFacingFudge: True
^Tank: ^Tank:
Inherits: ^Vehicle Inherits: ^Vehicle
@@ -401,6 +403,8 @@
Hovers@CRUISING: Hovers@CRUISING:
UpgradeTypes: cruising UpgradeTypes: cruising
UpgradeMinEnabledLevel: 1 UpgradeMinEnabledLevel: 1
BodyOrientation:
UseClassicFacingFudge: True
^BasicBuilding: ^BasicBuilding:
Inherits@1: ^ExistsInWorld Inherits@1: ^ExistsInWorld
@@ -626,6 +630,8 @@
Chronoshiftable: Chronoshiftable:
Tooltip: Tooltip:
GenericName: Destroyed Vehicle GenericName: Destroyed Vehicle
BodyOrientation:
UseClassicFacingFudge: True
^PlaneHusk: ^PlaneHusk:
Inherits: ^BasicHusk Inherits: ^BasicHusk
@@ -650,6 +656,8 @@
CruisingUpgrades: cruising CruisingUpgrades: cruising
CanHover: True CanHover: True
FallsToEarth: FallsToEarth:
BodyOrientation:
UseClassicFacingFudge: True
^Bridge: ^Bridge:
AlwaysVisible: AlwaysVisible:

View File

@@ -493,6 +493,8 @@ AGUN:
Range: 6c0 Range: 6c0
WithBuildingExplosion: WithBuildingExplosion:
Sequences: building, building_napalm, large_explosion, self_destruct Sequences: building, building_napalm, large_explosion, self_destruct
BodyOrientation:
UseClassicFacingFudge: True
DOME: DOME:
Inherits: ^Building Inherits: ^Building
@@ -646,7 +648,7 @@ GUN:
HasMinibib: Yes HasMinibib: Yes
Turreted: Turreted:
ROT: 12 ROT: 12
InitialFacing: 50 InitialFacing: 56
-WithSpriteBody: -WithSpriteBody:
WithTurretedSpriteBody: WithTurretedSpriteBody:
Armament: Armament:
@@ -661,6 +663,8 @@ GUN:
Range: 7c0 Range: 7c0
WithBuildingExplosion: WithBuildingExplosion:
Sequences: building, building_napalm, large_explosion, self_destruct Sequences: building, building_napalm, large_explosion, self_destruct
BodyOrientation:
UseClassicFacingFudge: True
FTUR: FTUR:
Inherits: ^Defense Inherits: ^Defense
@@ -741,6 +745,8 @@ SAM:
Amount: -40 Amount: -40
DetectCloaked: DetectCloaked:
Range: 5c0 Range: 5c0
BodyOrientation:
UseClassicFacingFudge: True
ATEK: ATEK:
Inherits: ^ScienceBuilding Inherits: ^ScienceBuilding
@@ -1066,6 +1072,7 @@ HPAD:
SpawnOffset: 0,-256,0 SpawnOffset: 0,-256,0
ExitCell: 0,0 ExitCell: 0,0
MoveIntoWorld: false MoveIntoWorld: false
Facing: 224
RallyPoint: RallyPoint:
Production: Production:
Produces: Aircraft, Helicopter Produces: Aircraft, Helicopter

View File

@@ -14,6 +14,7 @@ yak:
heli: heli:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
rotor: lrotor rotor: lrotor
Length: 4 Length: 4
slow-rotor: lrotor slow-rotor: lrotor
@@ -24,6 +25,7 @@ heli:
hind: hind:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
rotor: lrotorlg rotor: lrotorlg
Length: 4 Length: 4
slow-rotor: lrotorlg slow-rotor: lrotorlg
@@ -37,6 +39,7 @@ hind:
tran: tran:
idle: tran2 idle: tran2
Facings: 32 Facings: 32
UseClassicFacingFudge: True
rotor: lrotor rotor: lrotor
Length: 4 Length: 4
rotor2: rrotor rotor2: rrotor

View File

@@ -344,17 +344,21 @@ fix:
gun: gun:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
recoil: recoil:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
make: gunmake make: gunmake
Length: * Length: *
damaged-idle: damaged-idle:
Start: 64 Start: 64
Facings: 32 Facings: 32
UseClassicFacingFudge: True
damaged-recoil: damaged-recoil:
Start: 96 Start: 96
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: gunfire2 muzzle: gunfire2
Length: 5 Length: 5
bib: mbGUN bib: mbGUN
@@ -366,10 +370,12 @@ gun:
agun: agun:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
Offset: 0,-1 Offset: 0,-1
recoil: recoil:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
Offset: 0,-1 Offset: 0,-1
make: agunmake make: agunmake
Length: * Length: *
@@ -377,10 +383,12 @@ agun:
damaged-idle: damaged-idle:
Start: 64 Start: 64
Facings: 32 Facings: 32
UseClassicFacingFudge: True
Offset: 0,-1 Offset: 0,-1
damaged-recoil: damaged-recoil:
Start: 96 Start: 96
Facings: 32 Facings: 32
UseClassicFacingFudge: True
Offset: 0,-1 Offset: 0,-1
muzzle: gunfire2 muzzle: gunfire2
Start: 1 Start: 1
@@ -394,10 +402,12 @@ agun:
sam: sam:
idle: sam2 idle: sam2
Facings: 32 Facings: 32
UseClassicFacingFudge: True
Offset: -2,-2 Offset: -2,-2
damaged-idle: sam2 damaged-idle: sam2
Start: 34 Start: 34
Facings: 32 Facings: 32
UseClassicFacingFudge: True
Offset: -2,-2 Offset: -2,-2
make: sammake make: sammake
Length: * Length: *

View File

@@ -1,39 +1,46 @@
mcv: mcv:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
icon: mcvicon icon: mcvicon
mcvhusk: mcvhusk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -1023 ZOffset: -1023
truk: truk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
icon: trukicon icon: trukicon
harv: harv:
idle: harvempty idle: harvempty
Facings: 32 Facings: 32
UseClassicFacingFudge: True
harvest: harvempty harvest: harvempty
Start: 32 Start: 32
Length: 8 Length: 8
Facings: 8 Facings: 8
empty-idle: harvempty empty-idle: harvempty
Facings: 32 Facings: 32
UseClassicFacingFudge: True
empty-harvest: harvempty empty-harvest: harvempty
Start: 32 Start: 32
Length: 8 Length: 8
Facings: 8 Facings: 8
half-idle: harvhalf half-idle: harvhalf
Facings: 32 Facings: 32
UseClassicFacingFudge: True
half-harvest: harvhalf half-harvest: harvhalf
Start: 32 Start: 32
Length: 8 Length: 8
Facings: 8 Facings: 8
full-idle: full-idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
full-harvest: full-harvest:
Start: 32 Start: 32
Length: 8 Length: 8
@@ -50,19 +57,23 @@ harv:
hhusk: hhusk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -1023 ZOffset: -1023
hhusk2: hhusk2:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -1023 ZOffset: -1023
1tnk: 1tnk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: gunfire2 muzzle: gunfire2
Length: 2 Length: 2
icon: 1tnkicon icon: 1tnkicon
@@ -70,18 +81,22 @@ hhusk2:
1tnk.destroyed: 1tnk.destroyed:
idle: 1tnk idle: 1tnk
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
turret: 1tnk turret: 1tnk
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
2tnk: 2tnk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: gunfire2 muzzle: gunfire2
Length: 5 Length: 5
icon: 2tnkicon icon: 2tnkicon
@@ -89,18 +104,22 @@ hhusk2:
2tnk.destroyed: 2tnk.destroyed:
idle: 2tnk idle: 2tnk
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
turret: 2tnk turret: 2tnk
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
3tnk: 3tnk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: gunfire2 muzzle: gunfire2
Length: 5 Length: 5
icon: 3tnkicon icon: 3tnkicon
@@ -108,18 +127,22 @@ hhusk2:
3tnk.destroyed: 3tnk.destroyed:
idle: 3tnk idle: 3tnk
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
turret: 3tnk turret: 3tnk
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
4tnk: 4tnk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: gunfire2 muzzle: gunfire2
Length: 5 Length: 5
icon: 4tnkicon icon: 4tnkicon
@@ -127,18 +150,22 @@ hhusk2:
4tnk.destroyed: 4tnk.destroyed:
idle: 4tnk idle: 4tnk
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
turret: 4tnk turret: 4tnk
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
v2rl: v2rl:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
empty-idle: empty-idle:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
aim: aim:
Start: 64 Start: 64
Facings: 8 Facings: 8
@@ -150,6 +177,7 @@ v2rl:
arty: arty:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: gunfire2 muzzle: gunfire2
Length: 5 Length: 5
icon: artyicon icon: artyicon
@@ -157,19 +185,23 @@ arty:
jeep: jeep:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: minigun muzzle: minigun
Length: 6 Length: 6
Facings: 8 Facings: 8
unload: unload:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
icon: jeepicon icon: jeepicon
apc: apc:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: minigun muzzle: minigun
Length: 6 Length: 6
Facings: 8 Facings: 8
@@ -183,11 +215,13 @@ apc:
mnly: mnly:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
icon: mnlyicon icon: mnlyicon
mrj: mrj:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
spinner: spinner:
Start: 32 Start: 32
Length: 32 Length: 32
@@ -196,6 +230,7 @@ mrj:
mgg: mgg:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
spinner: spinner:
Start: 32 Start: 32
Length: 8 Length: 8
@@ -207,6 +242,7 @@ mgg:
mgg.destroyed: mgg.destroyed:
idle: mgg idle: mgg
Facings: 32 Facings: 32
UseClassicFacingFudge: True
ZOffset: -512 ZOffset: -512
spinner: mgg spinner: mgg
Start: 32 Start: 32
@@ -218,6 +254,7 @@ mgg.destroyed:
ttnk: ttnk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
spinner: spinner:
Start: 32 Start: 32
Length: 32 Length: 32
@@ -226,9 +263,11 @@ ttnk:
ftrk: ftrk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 32 Start: 32
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: gunfire2 muzzle: gunfire2
Length: 2 Length: 2
icon: ftrkicon icon: ftrkicon
@@ -236,11 +275,13 @@ ftrk:
dtrk: dtrk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
icon: dtrkicon icon: dtrkicon
ctnk: ctnk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
muzzle: gunfire2 muzzle: gunfire2
Length: 5 Length: 5
icon: ctnkicon icon: ctnkicon
@@ -248,6 +289,7 @@ ctnk:
qtnk: qtnk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
piston: piston:
Start: 32 Start: 32
Facings: 8 Facings: 8
@@ -257,6 +299,7 @@ qtnk:
stnk: stnk:
idle: idle:
Facings: 32 Facings: 32
UseClassicFacingFudge: True
turret: turret:
Start: 38 Start: 38
Facings: 32 Facings: 32