Add ActorInfo.HasTraitInfo<T>() requiring ITraitInfo types
This commit is contained in:
@@ -77,7 +77,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
// If a sprite actor has neither custom QuantizedFacings nor a trait implementing IQuantizeBodyOrientationInfo, throw
|
||||
if (qboi == null)
|
||||
{
|
||||
if (self.Info.Traits.Contains<ISpriteBodyInfo>())
|
||||
if (self.Info.HasTraitInfo<ISpriteBodyInfo>())
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user