diff --git a/OpenRA.Mods.Common/Traits/BodyOrientation.cs b/OpenRA.Mods.Common/Traits/BodyOrientation.cs index 39c47652a3..b10fdc89a0 100644 --- a/OpenRA.Mods.Common/Traits/BodyOrientation.cs +++ b/OpenRA.Mods.Common/Traits/BodyOrientation.cs @@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits public object Create(ActorInitializer init) { return new BodyOrientation(init, this); } } - public class BodyOrientation : IBodyOrientation + public class BodyOrientation : IBodyOrientation, ISync { readonly BodyOrientationInfo info; readonly Lazy quantizedFacings; @@ -73,12 +73,16 @@ namespace OpenRA.Mods.Common.Traits return info.QuantizedFacings; var qboi = self.Info.Traits.GetOrDefault(); - var isb = self.HasTrait(); // 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."); + if (qboi == null) + { + if (self.HasTrait()) + 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."); + else + throw new InvalidOperationException("Actor type '" + self.Info.Name + "' does not define a quantized body orientation."); + } return qboi.QuantizedBodyFacings(self.Info, self.World.Map.SequenceProvider, faction); }); diff --git a/mods/cnc/rules/defaults.yaml b/mods/cnc/rules/defaults.yaml index 46d7572e6d..6369541f62 100644 --- a/mods/cnc/rules/defaults.yaml +++ b/mods/cnc/rules/defaults.yaml @@ -691,6 +691,7 @@ DamagedSounds: xplos.aud DestroyedSounds: xplobig4.aud BodyOrientation: + QuantizedFacings: 1 ScriptTriggers: ^Crate: diff --git a/mods/ra/rules/defaults.yaml b/mods/ra/rules/defaults.yaml index 14921451c6..59c584a3aa 100644 --- a/mods/ra/rules/defaults.yaml +++ b/mods/ra/rules/defaults.yaml @@ -636,6 +636,7 @@ Type: Concrete AutoTargetIgnore: BodyOrientation: + QuantizedFacings: 1 ScriptTriggers: ^Rock: diff --git a/mods/ra/rules/misc.yaml b/mods/ra/rules/misc.yaml index e0acacb67d..9e329f55ef 100644 --- a/mods/ra/rules/misc.yaml +++ b/mods/ra/rules/misc.yaml @@ -200,6 +200,7 @@ camera.paradrop: ProximityCaptor: Types: Camera BodyOrientation: + QuantizedFacings: 1 SONAR: AlwaysVisible: