Merge pull request #9004 from reaperrr/quanbo

Introduce QuantizeFacingsFromSequence
This commit is contained in:
Matthias Mailänder
2015-08-28 22:46:29 +02:00
29 changed files with 196 additions and 80 deletions

View File

@@ -191,7 +191,6 @@
<Compile Include="Graphics\VoxelRenderer.cs" /> <Compile Include="Graphics\VoxelRenderer.cs" />
<Compile Include="Graphics\VoxelLoader.cs" /> <Compile Include="Graphics\VoxelLoader.cs" />
<Compile Include="Graphics\VoxelProvider.cs" /> <Compile Include="Graphics\VoxelProvider.cs" />
<Compile Include="Traits\BodyOrientation.cs" />
<Compile Include="Graphics\VoxelAnimation.cs" /> <Compile Include="Graphics\VoxelAnimation.cs" />
<Compile Include="Traits\Player\FrozenActorLayer.cs" /> <Compile Include="Traits\Player\FrozenActorLayer.cs" />
<Compile Include="Graphics\Theater.cs" /> <Compile Include="Graphics\Theater.cs" />

View File

@@ -308,22 +308,6 @@ namespace OpenRA.Traits
public interface IPostRenderSelection { IEnumerable<IRenderable> RenderAfterWorld(WorldRenderer wr); } public interface IPostRenderSelection { IEnumerable<IRenderable> RenderAfterWorld(WorldRenderer wr); }
public interface IBodyOrientation
{
WAngle CameraPitch { get; }
int QuantizedFacings { get; }
WVec LocalToWorld(WVec vec);
WRot QuantizeOrientation(Actor self, WRot orientation);
}
public interface IBodyOrientationInfo : ITraitInfo
{
WVec LocalToWorld(WVec vec);
WRot QuantizeOrientation(WRot orientation, int facings);
}
public interface IQuantizeBodyOrientationInfo { int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction); }
public interface ITargetableInfo public interface ITargetableInfo
{ {
string[] GetTargetTypes(); string[] GetTargetTypes();

View File

@@ -27,11 +27,6 @@ namespace OpenRA.Mods.Cnc.Traits
[SequenceReference] public readonly string WakeRightSequence = "wake-right"; [SequenceReference] public readonly string WakeRightSequence = "wake-right";
public override object Create(ActorInitializer init) { return new WithGunboatBody(init, this); } public override object Create(ActorInitializer init) { return new WithGunboatBody(init, this); }
public override int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction)
{
return 2;
}
} }
class WithGunboatBody : WithSpriteBody, ITick class WithGunboatBody : WithSpriteBody, ITick

View File

@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.Common.Effects namespace OpenRA.Mods.Common.Effects

View File

@@ -399,6 +399,8 @@
<Compile Include="Traits\ProvidesRadar.cs" /> <Compile Include="Traits\ProvidesRadar.cs" />
<Compile Include="Traits\ProximityCaptor.cs" /> <Compile Include="Traits\ProximityCaptor.cs" />
<Compile Include="Traits\ProximityCapturable.cs" /> <Compile Include="Traits\ProximityCapturable.cs" />
<Compile Include="Traits\BodyOrientation.cs" />
<Compile Include="Traits\QuantizeFacingsFromSequence.cs" />
<Compile Include="Traits\RadarColorFromTerrain.cs" /> <Compile Include="Traits\RadarColorFromTerrain.cs" />
<Compile Include="Traits\Render\AutoSelectionSize.cs" /> <Compile Include="Traits\Render\AutoSelectionSize.cs" />
<Compile Include="Traits\Render\Hovers.cs" /> <Compile Include="Traits\Render\Hovers.cs" />

View File

@@ -9,8 +9,11 @@
#endregion #endregion
using System; using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Traits;
namespace OpenRA.Traits namespace OpenRA.Mods.Common.Traits
{ {
public class BodyOrientationInfo : ITraitInfo, IBodyOrientationInfo public class BodyOrientationInfo : ITraitInfo, IBodyOrientationInfo
{ {
@@ -70,8 +73,12 @@ namespace OpenRA.Traits
return info.QuantizedFacings; return info.QuantizedFacings;
var qboi = self.Info.Traits.GetOrDefault<IQuantizeBodyOrientationInfo>(); var qboi = self.Info.Traits.GetOrDefault<IQuantizeBodyOrientationInfo>();
if (qboi == null) var isb = self.HasTrait<ISpriteBody>();
throw new InvalidOperationException("Actor type '" + self.Info.Name + "' does not define a quantized body orientation.");
// If a sprite actor has neither custom QuantizedFacings nor a trait implementing IQuantizeBodyOrientationInfo, throw
if (qboi == null && isb)
throw new InvalidOperationException("Actor" + self.Info.Name + "has a sprite body but no facing quantization."
+ " Either add the QuantizeFacingsFromSequence trait or set custom QuantizedFacings on BodyOrientation.");
return qboi.QuantizedBodyFacings(self.Info, self.World.Map.SequenceProvider, faction); return qboi.QuantizedBodyFacings(self.Info, self.World.Map.SequenceProvider, faction);
}); });

View File

@@ -0,0 +1,43 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics;
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Derive facings from sprite body sequence.")]
public class QuantizeFacingsFromSequenceInfo : UpgradableTraitInfo, IQuantizeBodyOrientationInfo, Requires<RenderSpritesInfo>
{
[Desc("Defines sequence to derive facings from."), SequenceReference]
public readonly string Sequence = "idle";
public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race)
{
if (string.IsNullOrEmpty(Sequence))
throw new InvalidOperationException("Actor " + ai.Name + " is missing sequence to quantize facings from.");
var rsi = ai.Traits.Get<RenderSpritesInfo>();
return sequenceProvider.GetSequence(rsi.GetImage(ai, sequenceProvider, race), Sequence).Facings;
}
public override object Create(ActorInitializer init) { return new QuantizeFacingsFromSequence(this); }
}
public class QuantizeFacingsFromSequence : UpgradableTrait<QuantizeFacingsFromSequenceInfo>
{
public QuantizeFacingsFromSequence(QuantizeFacingsFromSequenceInfo info)
: base(info) { }
}
}

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Basic render trait for immobile actors. Deprecated, use RenderSprites + WithSpriteBody instead.")] [Desc("Basic render trait for immobile actors. Deprecated, use RenderSprites + WithSpriteBody instead.")]
public class RenderSimpleInfo : RenderSpritesInfo, IRenderActorPreviewSpritesInfo, IQuantizeBodyOrientationInfo, Requires<IBodyOrientationInfo> public class RenderSimpleInfo : RenderSpritesInfo, IRenderActorPreviewSpritesInfo, Requires<IBodyOrientationInfo>
{ {
[SequenceReference] public readonly string Sequence = "idle"; [SequenceReference] public readonly string Sequence = "idle";
@@ -33,11 +33,6 @@ namespace OpenRA.Mods.Common.Traits
yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale); yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale);
} }
public virtual int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction)
{
return sequenceProvider.GetSequence(GetImage(ai, sequenceProvider, faction), Sequence).Facings;
}
} }
public class RenderSimple : RenderSprites, IAutoSelectionSize public class RenderSimple : RenderSprites, IAutoSelectionSize

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Renders crates with both water and land variants.")] [Desc("Renders crates with both water and land variants.")]
class WithCrateBodyInfo : ITraitInfo, Requires<RenderSpritesInfo>, IQuantizeBodyOrientationInfo, IRenderActorPreviewSpritesInfo class WithCrateBodyInfo : ITraitInfo, Requires<RenderSpritesInfo>, IRenderActorPreviewSpritesInfo
{ {
[Desc("Easteregg sequences to use in december.")] [Desc("Easteregg sequences to use in december.")]
public readonly string[] XmasImages = { }; public readonly string[] XmasImages = { };
@@ -35,8 +35,6 @@ namespace OpenRA.Mods.Common.Traits
anim.PlayRepeating(RenderSprites.NormalizeSequence(anim, init.GetDamageState(), IdleSequence)); anim.PlayRepeating(RenderSprites.NormalizeSequence(anim, init.GetDamageState(), IdleSequence));
yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale); yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale);
} }
public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { return 1; }
} }
class WithCrateBody : INotifyParachuteLanded class WithCrateBody : INotifyParachuteLanded

View File

@@ -30,12 +30,6 @@ namespace OpenRA.Mods.Common.Traits
yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale); yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale);
} }
public override int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction)
{
var rsi = ai.Traits.Get<RenderSpritesInfo>();
return sequenceProvider.GetSequence(rsi.GetImage(ai, sequenceProvider, faction), Sequence).Facings;
}
} }
public class WithFacingSpriteBody : WithSpriteBody public class WithFacingSpriteBody : WithSpriteBody

View File

@@ -16,8 +16,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits namespace OpenRA.Mods.Common.Traits
{ {
public class WithInfantryBodyInfo : UpgradableTraitInfo, IQuantizeBodyOrientationInfo, IRenderActorPreviewSpritesInfo, public class WithInfantryBodyInfo : UpgradableTraitInfo, IRenderActorPreviewSpritesInfo, Requires<IMoveInfo>, Requires<RenderSpritesInfo>
Requires<IMoveInfo>, Requires<RenderSpritesInfo>
{ {
public readonly int MinIdleWaitTicks = 30; public readonly int MinIdleWaitTicks = 30;
public readonly int MaxIdleWaitTicks = 110; public readonly int MaxIdleWaitTicks = 110;
@@ -40,12 +39,6 @@ namespace OpenRA.Mods.Common.Traits
anim.PlayRepeating(RenderSprites.NormalizeSequence(anim, init.GetDamageState(), StandSequences.First())); anim.PlayRepeating(RenderSprites.NormalizeSequence(anim, init.GetDamageState(), StandSequences.First()));
yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale); yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale);
} }
public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction)
{
var rsi = ai.Traits.Get<RenderSpritesInfo>();
return sequenceProvider.GetSequence(rsi.GetImage(ai, sequenceProvider, faction), StandSequences.First()).Facings;
}
} }
public class WithInfantryBody : UpgradableTrait<WithInfantryBodyInfo>, ITick, INotifyAttack, INotifyIdle, INotifyCreated public class WithInfantryBody : UpgradableTrait<WithInfantryBodyInfo>, ITick, INotifyAttack, INotifyIdle, INotifyCreated

View File

@@ -17,8 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Default trait for rendering sprite-based actors.")] [Desc("Default trait for rendering sprite-based actors.")]
public class WithSpriteBodyInfo : UpgradableTraitInfo, IRenderActorPreviewSpritesInfo, IQuantizeBodyOrientationInfo, public class WithSpriteBodyInfo : UpgradableTraitInfo, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>
Requires<RenderSpritesInfo>
{ {
[Desc("Animation to play when the actor is created.")] [Desc("Animation to play when the actor is created.")]
[SequenceReference] public readonly string StartSequence = null; [SequenceReference] public readonly string StartSequence = null;
@@ -35,11 +34,6 @@ namespace OpenRA.Mods.Common.Traits
yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale); yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale);
} }
public virtual int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction)
{
return 1;
}
} }
public class WithSpriteBody : UpgradableTrait<WithSpriteBodyInfo>, ISpriteBody, INotifyDamageStateChanged public class WithSpriteBody : UpgradableTrait<WithSpriteBodyInfo>, ISpriteBody, INotifyDamageStateChanged

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Also returns a default selection size that is calculated automatically from the voxel dimensions.")] [Desc("Also returns a default selection size that is calculated automatically from the voxel dimensions.")]
public class WithVoxelBodyInfo : ITraitInfo, IQuantizeBodyOrientationInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo> public class WithVoxelBodyInfo : ITraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>
{ {
public readonly string Sequence = "idle"; public readonly string Sequence = "idle";
@@ -33,8 +33,6 @@ namespace OpenRA.Mods.Common.Traits
() => bodyOrientation, () => bodyOrientation,
() => false, () => 0); () => false, () => 0);
} }
public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { return 0; }
} }
public class WithVoxelBody : IAutoSelectionSize public class WithVoxelBody : IAutoSelectionSize

View File

@@ -25,6 +25,25 @@ namespace OpenRA.Mods.Common.Traits
void PlayCustomAnimationBackwards(Actor self, string name, Action after); void PlayCustomAnimationBackwards(Actor self, string name, Action after);
} }
public interface IBodyOrientation
{
WAngle CameraPitch { get; }
int QuantizedFacings { get; }
WVec LocalToWorld(WVec vec);
WRot QuantizeOrientation(Actor self, WRot orientation);
}
public interface IBodyOrientationInfo : ITraitInfo
{
WVec LocalToWorld(WVec vec);
WRot QuantizeOrientation(WRot orientation, int facings);
}
public interface IQuantizeBodyOrientationInfo : ITraitInfo
{
int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race);
}
public interface INotifyResourceClaimLost public interface INotifyResourceClaimLost
{ {
void OnNotifyResourceClaimLost(Actor self, ResourceClaim claim, Actor claimer); void OnNotifyResourceClaimLost(Actor self, ResourceClaim claim, Actor claimer);

View File

@@ -1782,6 +1782,34 @@ namespace OpenRA.Mods.Common.UtilityCommands
node.Key = "ValidFactions"; node.Key = "ValidFactions";
} }
if (engineVersion < 20150823)
{
// Introduce QuantizeFacingsFromSequence
// This will only do roughly the right thing and probably require the modder to do some manual cleanup
if (depth == 0)
{
var inftraits = node.Value.Nodes.FirstOrDefault(n =>
n.Key.StartsWith("WithInfantryBody")
|| n.Key.StartsWith("WithDisguisingInfantryBody"));
if (inftraits != null)
{
node.Value.Nodes.Add(new MiniYamlNode("QuantizeFacingsFromSequence", null, new List<MiniYamlNode>
{
new MiniYamlNode("Sequence", "stand"),
}));
}
var other = node.Value.Nodes.FirstOrDefault(x =>
x.Key.StartsWith("RenderBuilding")
|| x.Key.StartsWith("RenderSimple")
|| x.Key.StartsWith("WithCrateBody")
|| x.Key.StartsWith("WithSpriteBody")
|| x.Key.StartsWith("WithFacingSpriteBody"));
if (other != null)
node.Value.Nodes.Add(new MiniYamlNode("QuantizeFacingsFromSequence", ""));
}
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
} }
} }

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.TS.Traits namespace OpenRA.Mods.TS.Traits
{ {
public class WithVoxelUnloadBodyInfo : ITraitInfo, IQuantizeBodyOrientationInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo> public class WithVoxelUnloadBodyInfo : ITraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>
{ {
[Desc("Voxel sequence name to use when docked to a refinery.")] [Desc("Voxel sequence name to use when docked to a refinery.")]
public readonly string UnloadSequence = "unload"; public readonly string UnloadSequence = "unload";
@@ -36,8 +36,6 @@ namespace OpenRA.Mods.TS.Traits
() => new[] { body.QuantizeOrientation(orientation, facings) }, () => new[] { body.QuantizeOrientation(orientation, facings) },
() => false, () => 0); () => false, () => 0);
} }
public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { return 0; }
} }
public class WithVoxelUnloadBody : IAutoSelectionSize public class WithVoxelUnloadBody : IAutoSelectionSize

View File

@@ -16,12 +16,10 @@ using OpenRA.Traits;
namespace OpenRA.Mods.TS.Traits namespace OpenRA.Mods.TS.Traits
{ {
public class WithVoxelWalkerBodyInfo : ITraitInfo, IQuantizeBodyOrientationInfo, Requires<RenderVoxelsInfo>, Requires<IMoveInfo> public class WithVoxelWalkerBodyInfo : ITraitInfo, Requires<RenderVoxelsInfo>, Requires<IMoveInfo>
{ {
public readonly int TickRate = 5; public readonly int TickRate = 5;
public object Create(ActorInitializer init) { return new WithVoxelWalkerBody(init.Self, this); } public object Create(ActorInitializer init) { return new WithVoxelWalkerBody(init.Self, this); }
public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { return 0; }
} }
public class WithVoxelWalkerBody : IAutoSelectionSize, ITick public class WithVoxelWalkerBody : IAutoSelectionSize, ITick

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.TS.Traits namespace OpenRA.Mods.TS.Traits
{ {
public class WithVoxelWaterBodyInfo : ITraitInfo, IQuantizeBodyOrientationInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo> public class WithVoxelWaterBodyInfo : ITraitInfo, IRenderActorPreviewVoxelsInfo, Requires<RenderVoxelsInfo>
{ {
public readonly string WaterSequence = "water"; public readonly string WaterSequence = "water";
public readonly string LandSequence = "idle"; public readonly string LandSequence = "idle";
@@ -41,8 +41,6 @@ namespace OpenRA.Mods.TS.Traits
() => new[] { body.QuantizeOrientation(orientation, facings) }, () => new[] { body.QuantizeOrientation(orientation, facings) },
() => false, () => 0); () => false, () => 0);
} }
public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { return 0; }
} }
public class WithVoxelWaterBody : IAutoSelectionSize public class WithVoxelWaterBody : IAutoSelectionSize

View File

@@ -74,9 +74,10 @@
AttackMove: AttackMove:
DrawLineToTarget: DrawLineToTarget:
WithSmoke: WithSmoke:
RenderSprites:
QuantizeFacingsFromSequence:
WithFacingSpriteBody: WithFacingSpriteBody:
AutoSelectionSize: AutoSelectionSize:
RenderSprites:
Explodes: Explodes:
Weapon: UnitExplodeSmall Weapon: UnitExplodeSmall
EmptyWeapon: UnitExplodeSmall EmptyWeapon: UnitExplodeSmall
@@ -137,6 +138,7 @@
Guardable: Guardable:
Tooltip: Tooltip:
GenericName: Helicopter GenericName: Helicopter
QuantizeFacingsFromSequence:
WithFacingSpriteBody: WithFacingSpriteBody:
AutoSelectionSize: AutoSelectionSize:
RenderSprites: RenderSprites:
@@ -173,6 +175,8 @@
TargetableUnit: TargetableUnit:
TargetTypes: Ground, Infantry TargetTypes: Ground, Infantry
RenderSprites: RenderSprites:
QuantizeFacingsFromSequence:
Sequence: stand
WithInfantryBody: WithInfantryBody:
WithDeathAnimation: WithDeathAnimation:
DeathTypes: DeathTypes:
@@ -301,6 +305,8 @@
TargetableUnit: TargetableUnit:
TargetTypes: Ground TargetTypes: Ground
HiddenUnderFog: HiddenUnderFog:
QuantizeFacingsFromSequence:
Sequence: stand
WithInfantryBody: WithInfantryBody:
AttackSequence: attack AttackSequence: attack
WithDeathAnimation: WithDeathAnimation:
@@ -359,7 +365,9 @@
MuzzleSplitFacings: 8 MuzzleSplitFacings: 8
AttackFrontal: AttackFrontal:
Voice: Attack Voice: Attack
WithFacingSpriteBody: BodyOrientation:
QuantizedFacings: 8
WithSpriteBody:
AutoSelectionSize: AutoSelectionSize:
RenderSprites: RenderSprites:
WithMuzzleFlash: WithMuzzleFlash:
@@ -367,8 +375,6 @@
Guard: Guard:
Voice: Move Voice: Move
Guardable: Guardable:
BodyOrientation:
QuantizedFacings: 8
PoisonedByTiberium: PoisonedByTiberium:
Weapon: Heal Weapon: Heal
Voiced: Voiced:
@@ -383,6 +389,7 @@
ActorLostNotification: ActorLostNotification:
AttackMove: AttackMove:
WithShadow: WithShadow:
QuantizeFacingsFromSequence:
WithFacingSpriteBody: WithFacingSpriteBody:
RenderSprites: RenderSprites:
AutoSelectionSize: AutoSelectionSize:
@@ -424,6 +431,7 @@
SoundOnDamageTransition: SoundOnDamageTransition:
DamagedSounds: xplos.aud DamagedSounds: xplos.aud
DestroyedSounds: crumble.aud DestroyedSounds: crumble.aud
QuantizeFacingsFromSequence:
RenderBuilding: RenderBuilding:
WithBuildingExplosion: WithBuildingExplosion:
Delay: 1 Delay: 1
@@ -480,6 +488,7 @@
Building: Building:
Dimensions: 1,1 Dimensions: 1,1
Footprint: x Footprint: x
QuantizeFacingsFromSequence:
RenderBuilding: RenderBuilding:
Tooltip: Tooltip:
Name: Civilian Building (Destroyed) Name: Civilian Building (Destroyed)
@@ -521,6 +530,7 @@
Name: Field (Destroyed) Name: Field (Destroyed)
GenericVisibility: None GenericVisibility: None
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
RenderSprites: RenderSprites:
Palette: terrain Palette: terrain
WithSpriteBody: WithSpriteBody:
@@ -548,6 +558,8 @@
NodeTypes: wall NodeTypes: wall
LineBuildNode: LineBuildNode:
Types: wall Types: wall
BodyOrientation:
QuantizedFacings: 1
RenderBuildingWall: RenderBuildingWall:
Palette: staticterrain Palette: staticterrain
GivesExperience: GivesExperience:
@@ -555,13 +567,14 @@
Sellable: Sellable:
SellSounds: cashturn.aud SellSounds: cashturn.aud
Guardable: Guardable:
BodyOrientation:
FrozenUnderFog: FrozenUnderFog:
ScriptTriggers: ScriptTriggers:
^Tree: ^Tree:
Tooltip: Tooltip:
Name: Tree Name: Tree
BodyOrientation:
QuantizedFacings: 1
RenderSprites: RenderSprites:
Palette: staticterrain Palette: staticterrain
WithSpriteBody: WithSpriteBody:
@@ -577,7 +590,6 @@
Armor: Armor:
Type: Wood Type: Wood
AutoTargetIgnore: AutoTargetIgnore:
BodyOrientation:
FrozenUnderFog: FrozenUnderFog:
StartsRevealed: true StartsRevealed: true
ScriptTriggers: ScriptTriggers:
@@ -585,6 +597,8 @@
^TibTree: ^TibTree:
Tooltip: Tooltip:
Name: Blossom Tree Name: Blossom Tree
BodyOrientation:
QuantizedFacings: 1
RenderBuilding: RenderBuilding:
Palette: staticterrain Palette: staticterrain
Building: Building:
@@ -593,7 +607,6 @@
AppearsOnRadar: AppearsOnRadar:
RadarColorFromTerrain: RadarColorFromTerrain:
Terrain: Tiberium Terrain: Tiberium
BodyOrientation:
FrozenUnderFog: FrozenUnderFog:
StartsRevealed: true StartsRevealed: true
WithMakeAnimation: WithMakeAnimation:
@@ -601,6 +614,8 @@
^Rock: ^Rock:
Tooltip: Tooltip:
Name: Rock Name: Rock
BodyOrientation:
QuantizedFacings: 1
RenderSprites: RenderSprites:
Palette: staticterrain Palette: staticterrain
WithSpriteBody: WithSpriteBody:
@@ -611,7 +626,6 @@
AppearsOnRadar: AppearsOnRadar:
RadarColorFromTerrain: RadarColorFromTerrain:
Terrain: Tree Terrain: Tree
BodyOrientation:
FrozenUnderFog: FrozenUnderFog:
StartsRevealed: true StartsRevealed: true
ScriptTriggers: ScriptTriggers:
@@ -627,6 +641,7 @@
Type: CenterPosition Type: CenterPosition
AutoTargetIgnore: AutoTargetIgnore:
BodyOrientation: BodyOrientation:
QuantizeFacingsFromSequence:
WithFacingSpriteBody: WithFacingSpriteBody:
AutoSelectionSize: AutoSelectionSize:
RenderSprites: RenderSprites:
@@ -685,6 +700,7 @@
GenericName: Crate GenericName: Crate
Crate: Crate:
TerrainTypes: Clear, Rough, Road, Tiberium, BlueTiberium, Beach TerrainTypes: Clear, Rough, Road, Tiberium, BlueTiberium, Beach
QuantizeFacingsFromSequence:
RenderSprites: RenderSprites:
Palette: effect Palette: effect
Image: crate Image: crate

View File

@@ -33,6 +33,7 @@ mpspawn:
RenderSpritesEditorOnly: RenderSpritesEditorOnly:
Palette: chrome Palette: chrome
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
waypoint: waypoint:
AlwaysVisible: AlwaysVisible:
@@ -42,6 +43,7 @@ waypoint:
RenderSpritesEditorOnly: RenderSpritesEditorOnly:
Palette: chrome Palette: chrome
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
^fact.colorpicker: ^fact.colorpicker:
Inherits: FACT Inherits: FACT
@@ -86,4 +88,5 @@ FLARE:
Tooltip: Tooltip:
Name: Flare Name: Flare
BodyOrientation: BodyOrientation:
QuantizedFacings: 1

View File

@@ -23,6 +23,8 @@ BOAT:
LocalOffset: 85,-85,0, 85,85,0 LocalOffset: 85,-85,0, 85,85,0
AttackTurreted: AttackTurreted:
RenderSprites: RenderSprites:
BodyOrientation:
QuantizedFacings: 2
WithGunboatBody: WithGunboatBody:
Sequence: left # Just a work-around to avoid crash Sequence: left # Just a work-around to avoid crash
Selectable: Selectable:
@@ -64,6 +66,7 @@ LST:
Type: Heavy Type: Heavy
RevealsShroud: RevealsShroud:
Range: 7c0 Range: 7c0
QuantizeFacingsFromSequence:
WithFacingSpriteBody: WithFacingSpriteBody:
WithRoof: WithRoof:
WithCargo: WithCargo:

View File

@@ -406,7 +406,6 @@ HTNK:
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleFlash:
WithFacingSpriteBody:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
SelfHealing: SelfHealing:

View File

@@ -79,6 +79,7 @@
Guard: Guard:
Voice: Guard Voice: Guard
Guardable: Guardable:
QuantizeFacingsFromSequence:
WithFacingSpriteBody: WithFacingSpriteBody:
Demolishable: Demolishable:
TemporaryOwnerManager: TemporaryOwnerManager:
@@ -118,6 +119,7 @@
BodyOrientation: BodyOrientation:
AutoTargetIgnore: AutoTargetIgnore:
ScriptTriggers: ScriptTriggers:
QuantizeFacingsFromSequence:
WithFacingSpriteBody: WithFacingSpriteBody:
AutoSelectionSize: AutoSelectionSize:
RenderSprites: RenderSprites:
@@ -191,6 +193,8 @@
UpgradeTypes: parachute UpgradeTypes: parachute
UpgradeMaxEnabledLevel: 0 UpgradeMaxEnabledLevel: 0
RenderSprites: RenderSprites:
QuantizeFacingsFromSequence:
Sequence: stand
WithInfantryBody: WithInfantryBody:
TakeCover: TakeCover:
DamageModifiers: DamageModifiers:
@@ -245,6 +249,7 @@
DrawLineToTarget: DrawLineToTarget:
Voiced: Voiced:
VoiceSet: GenericVoice VoiceSet: GenericVoice
QuantizeFacingsFromSequence:
WithFacingSpriteBody: WithFacingSpriteBody:
AutoSelectionSize: AutoSelectionSize:
RenderSprites: RenderSprites:
@@ -269,6 +274,7 @@
SoundOnDamageTransition: SoundOnDamageTransition:
DamagedSounds: EXPLSML1.WAV DamagedSounds: EXPLSML1.WAV
DestroyedSounds: EXPLHG1.WAV DestroyedSounds: EXPLHG1.WAV
QuantizeFacingsFromSequence:
RenderBuilding: RenderBuilding:
WithBuildingExplosion: WithBuildingExplosion:
RepairableBuilding: RepairableBuilding:

View File

@@ -103,6 +103,7 @@ crate:
SelectionShares: 0 SelectionShares: 0
NoBaseSelectionShares: 9001 NoBaseSelectionShares: 9001
Units: mcv Units: mcv
QuantizeFacingsFromSequence:
RenderSprites: RenderSprites:
Palette: effect Palette: effect
WithCrateBody: WithCrateBody:
@@ -117,6 +118,7 @@ mpspawn:
RenderSpritesEditorOnly: RenderSpritesEditorOnly:
WithSpriteBody: WithSpriteBody:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
waypoint: waypoint:
AlwaysVisible: AlwaysVisible:
@@ -125,6 +127,7 @@ waypoint:
RenderSpritesEditorOnly: RenderSpritesEditorOnly:
WithSpriteBody: WithSpriteBody:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
^carryall.colorpicker: ^carryall.colorpicker:
Inherits: carryall Inherits: carryall
@@ -152,6 +155,7 @@ wormspawner:
RenderSpritesEditorOnly: RenderSpritesEditorOnly:
WithSpriteBody: WithSpriteBody:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
WormSpawner: WormSpawner:
upgrade.conyard: upgrade.conyard:

View File

@@ -123,6 +123,7 @@
Explodes: Explodes:
Weapon: UnitExplodeSmall Weapon: UnitExplodeSmall
EmptyWeapon: UnitExplodeSmall EmptyWeapon: UnitExplodeSmall
QuantizeFacingsFromSequence:
WithFacingSpriteBody: WithFacingSpriteBody:
AutoSelectionSize: AutoSelectionSize:
RenderSprites: RenderSprites:
@@ -184,6 +185,8 @@
TargetTypes: Ground, Infantry, Disguise TargetTypes: Ground, Infantry, Disguise
UpgradeTypes: parachute UpgradeTypes: parachute
UpgradeMaxEnabledLevel: 0 UpgradeMaxEnabledLevel: 0
QuantizeFacingsFromSequence:
Sequence: stand
RenderSprites: RenderSprites:
WithInfantryBody: WithInfantryBody:
WithDeathAnimation: WithDeathAnimation:
@@ -322,6 +325,7 @@
ExcludeTilesets: INTERIOR ExcludeTilesets: INTERIOR
Voiced: Voiced:
VoiceSet: VehicleVoice VoiceSet: VehicleVoice
QuantizeFacingsFromSequence:
AutoSelectionSize: AutoSelectionSize:
RenderSprites: RenderSprites:
WithFacingSpriteBody: WithFacingSpriteBody:
@@ -359,6 +363,7 @@
Tooltip: Tooltip:
GenericName: Plane GenericName: Plane
WithShadow: WithShadow:
QuantizeFacingsFromSequence:
RenderSprites: RenderSprites:
WithFacingSpriteBody: WithFacingSpriteBody:
AutoSelectionSize: AutoSelectionSize:
@@ -390,6 +395,7 @@
SoundOnDamageTransition: SoundOnDamageTransition:
DamagedSounds: kaboom1.aud DamagedSounds: kaboom1.aud
DestroyedSounds: kaboom22.aud DestroyedSounds: kaboom22.aud
QuantizeFacingsFromSequence:
RenderBuilding: RenderBuilding:
WithBuildingExplosion: WithBuildingExplosion:
CaptureNotification: CaptureNotification:
@@ -466,6 +472,7 @@
SellSounds: cashturn.aud SellSounds: cashturn.aud
Guardable: Guardable:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
FrozenUnderFog: FrozenUnderFog:
GpsRemoveFrozenActor: GpsRemoveFrozenActor:
ScriptTriggers: ScriptTriggers:
@@ -551,6 +558,7 @@
Type: Wood Type: Wood
AutoTargetIgnore: AutoTargetIgnore:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
FrozenUnderFog: FrozenUnderFog:
StartsRevealed: true StartsRevealed: true
ScriptTriggers: ScriptTriggers:
@@ -564,6 +572,7 @@
Type: Heavy Type: Heavy
HiddenUnderFog: HiddenUnderFog:
Type: CenterPosition Type: CenterPosition
QuantizeFacingsFromSequence:
BodyOrientation: BodyOrientation:
AutoTargetIgnore: AutoTargetIgnore:
ScriptTriggers: ScriptTriggers:
@@ -645,6 +654,7 @@
ProximityCaptor: ProximityCaptor:
Types: Tree Types: Tree
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
FrozenUnderFog: FrozenUnderFog:
StartsRevealed: true StartsRevealed: true
ScriptTriggers: ScriptTriggers:
@@ -689,4 +699,5 @@
ShadowSequence: idle ShadowSequence: idle
UpgradeManager: UpgradeManager:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1

View File

@@ -25,6 +25,7 @@ MINP:
TargetableUnit: TargetableUnit:
TargetTypes: Ground TargetTypes: Ground
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
Immobile: Immobile:
OccupiesSpace: true OccupiesSpace: true
@@ -55,6 +56,7 @@ MINV:
TargetableUnit: TargetableUnit:
TargetTypes: Ground TargetTypes: Ground
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
Immobile: Immobile:
OccupiesSpace: true OccupiesSpace: true
@@ -179,6 +181,7 @@ CAMERA:
ProximityCaptor: ProximityCaptor:
Types: Camera Types: Camera
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
DetectCloaked: DetectCloaked:
Range: 10 Range: 10
WithSpriteBody: WithSpriteBody:
@@ -227,6 +230,7 @@ FLARE:
Name: Flare Name: Flare
ShowOwnerRow: false ShowOwnerRow: false
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
MINE: MINE:
HiddenUnderShroud: HiddenUnderShroud:
@@ -244,6 +248,7 @@ MINE:
Terrain: Ore Terrain: Ore
AutoTargetIgnore: AutoTargetIgnore:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
SeedsResource: SeedsResource:
GMINE: GMINE:
@@ -262,6 +267,7 @@ GMINE:
Terrain: Gems Terrain: Gems
AutoTargetIgnore: AutoTargetIgnore:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
SeedsResource: SeedsResource:
ResourceType: Gems ResourceType: Gems
@@ -278,6 +284,7 @@ RAILMINE:
Dimensions: 2,1 Dimensions: 2,1
AutoTargetIgnore: AutoTargetIgnore:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
EditorTilesetFilter: EditorTilesetFilter:
ExcludeTilesets: INTERIOR ExcludeTilesets: INTERIOR
@@ -293,6 +300,7 @@ QUEE:
AutoSelectionSize: AutoSelectionSize:
AppearsOnRadar: AppearsOnRadar:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
EditorTilesetFilter: EditorTilesetFilter:
RequireTilesets: INTERIOR RequireTilesets: INTERIOR
@@ -309,6 +317,7 @@ LAR1:
AutoSelectionSize: AutoSelectionSize:
AppearsOnRadar: AppearsOnRadar:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
EditorTilesetFilter: EditorTilesetFilter:
RequireTilesets: INTERIOR RequireTilesets: INTERIOR
@@ -325,6 +334,7 @@ LAR2:
AutoSelectionSize: AutoSelectionSize:
AppearsOnRadar: AppearsOnRadar:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
EditorTilesetFilter: EditorTilesetFilter:
RequireTilesets: INTERIOR RequireTilesets: INTERIOR
@@ -391,6 +401,7 @@ mpspawn:
WithSpriteBody: WithSpriteBody:
RenderSpritesEditorOnly: RenderSpritesEditorOnly:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
waypoint: waypoint:
AlwaysVisible: AlwaysVisible:
@@ -399,6 +410,7 @@ waypoint:
WithSpriteBody: WithSpriteBody:
RenderSpritesEditorOnly: RenderSpritesEditorOnly:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
^fact.colorpicker: ^fact.colorpicker:
Inherits: FACT Inherits: FACT

View File

@@ -62,6 +62,7 @@
SoundOnDamageTransition: SoundOnDamageTransition:
DamagedSounds: expnew01.aud DamagedSounds: expnew01.aud
DestroyedSounds: crmble2.aud DestroyedSounds: crmble2.aud
QuantizeFacingsFromSequence:
RenderBuilding: RenderBuilding:
WithBuildingExplosion: WithBuildingExplosion:
Sequences: building, large_bang, large_brnl, verylarge_clsn, large_tumu Sequences: building, large_bang, large_brnl, verylarge_clsn, large_tumu
@@ -227,6 +228,7 @@
VoiceSet: Infantry VoiceSet: Infantry
TargetableUnit: TargetableUnit:
TargetTypes: Ground, Infantry TargetTypes: Ground, Infantry
QuantizeFacingsFromSequence:
RenderSprites: RenderSprites:
WithInfantryBody: WithInfantryBody:
WithDeathAnimation@normal: WithDeathAnimation@normal:
@@ -419,11 +421,15 @@
^VoxelVehicle: ^VoxelVehicle:
Inherits: ^Vehicle Inherits: ^Vehicle
BodyOrientation:
QuantizedFacings: 0
RenderVoxels: RenderVoxels:
WithVoxelBody: WithVoxelBody:
^VoxelTank: ^VoxelTank:
Inherits: ^Tank Inherits: ^Tank
BodyOrientation:
QuantizedFacings: 0
RenderVoxels: RenderVoxels:
WithVoxelBody: WithVoxelBody:
@@ -452,6 +458,7 @@
Voice: Move Voice: Move
ActorLostNotification: ActorLostNotification:
BodyOrientation: BodyOrientation:
QuantizedFacings: 0
CameraPitch: 90 CameraPitch: 90
Guard: Guard:
Voice: Move Voice: Move
@@ -511,6 +518,8 @@
PoisonedByTiberium: PoisonedByTiberium:
Weapon: TiberiumHeal Weapon: TiberiumHeal
Guardable: Guardable:
BodyOrientation:
QuantizedFacings: 1
RenderSprites: RenderSprites:
WithSpriteBody: WithSpriteBody:
AutoSelectionSize: AutoSelectionSize:
@@ -528,6 +537,7 @@
Terrain: Tiberium Terrain: Tiberium
BodyOrientation: BodyOrientation:
UseClassicPerspectiveFudge: False UseClassicPerspectiveFudge: False
QuantizedFacings: 1
FrozenUnderFog: FrozenUnderFog:
StartsRevealed: true StartsRevealed: true
SeedsResource: SeedsResource:
@@ -537,6 +547,9 @@
^Tree: ^Tree:
HiddenUnderShroud: HiddenUnderShroud:
BodyOrientation:
UseClassicPerspectiveFudge: False
QuantizedFacings: 1
RenderSprites: RenderSprites:
Palette: terraindecoration Palette: terraindecoration
WithSpriteBody: WithSpriteBody:
@@ -547,13 +560,14 @@
AppearsOnRadar: AppearsOnRadar:
RadarColorFromTerrain: RadarColorFromTerrain:
Terrain: Tree Terrain: Tree
BodyOrientation:
UseClassicPerspectiveFudge: False
Tooltip: Tooltip:
Name: Tree Name: Tree
^Rock: ^Rock:
HiddenUnderShroud: HiddenUnderShroud:
BodyOrientation:
UseClassicPerspectiveFudge: False
QuantizedFacings: 1
RenderSprites: RenderSprites:
Palette: terraindecoration Palette: terraindecoration
WithSpriteBody: WithSpriteBody:
@@ -564,8 +578,6 @@
AppearsOnRadar: AppearsOnRadar:
RadarColorFromTerrain: RadarColorFromTerrain:
Terrain: Rock Terrain: Rock
BodyOrientation:
UseClassicPerspectiveFudge: False
Tooltip: Tooltip:
Name: Rock Name: Rock

View File

@@ -106,6 +106,8 @@ SMECH:
Weapon: AssaultCannon Weapon: AssaultCannon
Voiced: Voiced:
VoiceSet: Mech VoiceSet: Mech
QuantizeFacingsFromSequence:
Sequence: stand
WithFacingSpriteBody: WithFacingSpriteBody:
Sequence: stand Sequence: stand
WithAttackAnimation: WithAttackAnimation:
@@ -136,6 +138,8 @@ MMCH:
Type: Heavy Type: Heavy
RevealsShroud: RevealsShroud:
Range: 8c0 Range: 8c0
BodyOrientation:
QuantizedFacings: 32
WithInfantryBody: WithInfantryBody:
Turreted: Turreted:
ROT: 5 ROT: 5

View File

@@ -5,6 +5,7 @@ mpspawn:
RenderSpritesEditorOnly: RenderSpritesEditorOnly:
WithSpriteBody: WithSpriteBody:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
waypoint: waypoint:
AlwaysVisible: AlwaysVisible:
@@ -13,6 +14,7 @@ waypoint:
RenderSpritesEditorOnly: RenderSpritesEditorOnly:
WithSpriteBody: WithSpriteBody:
BodyOrientation: BodyOrientation:
QuantizedFacings: 1
^mmch.colorpicker: ^mmch.colorpicker:
Inherits: MMCH Inherits: MMCH