diff --git a/ClassicalSharp/Entities/Components/AnimatedComponent.cs b/ClassicalSharp/Entities/Components/AnimatedComponent.cs index dbd8e9abf..b40a199a1 100644 --- a/ClassicalSharp/Entities/Components/AnimatedComponent.cs +++ b/ClassicalSharp/Entities/Components/AnimatedComponent.cs @@ -71,7 +71,7 @@ namespace ClassicalSharp.Entities { tiltY = (float)Math.Sin(walkTime) * swing * (0.15f * Utils.Deg2Rad); } - if (entity.Model is HumanoidModel) + if (entity.Model.CalcHumanAnims) CalcHumanAnim(idleXRot, idleZRot); } diff --git a/ClassicalSharp/Entities/Model/HumanoidModel.cs b/ClassicalSharp/Entities/Model/HumanoidModel.cs index 9e07aca96..3f2523e98 100644 --- a/ClassicalSharp/Entities/Model/HumanoidModel.cs +++ b/ClassicalSharp/Entities/Model/HumanoidModel.cs @@ -10,7 +10,9 @@ namespace ClassicalSharp.Model { public class HumanoidModel : IModel { public ModelSet Set, SetSlim, Set64; - public HumanoidModel(Game window) : base(window) { } + public HumanoidModel(Game window) : base(window) { + CalcHumanAnims = true; + } protected BoxDesc head, torso, lLeg, rLeg, lArm, rArm; protected float offset = 0.5f; diff --git a/ClassicalSharp/Entities/Model/IModel.cs b/ClassicalSharp/Entities/Model/IModel.cs index 7a54ed41e..27d11eb6a 100644 --- a/ClassicalSharp/Entities/Model/IModel.cs +++ b/ClassicalSharp/Entities/Model/IModel.cs @@ -30,6 +30,9 @@ namespace ClassicalSharp.Model { /// Whether this entity requires downloading of a skin texture. public bool UsesSkin = true; + /// Whether humanoid animations should be calculated, instead of normal animations. + public bool CalcHumanAnims; + /// Gravity applied to this entity. public virtual float Gravity { get { return 0.08f; } }