mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-24 01:52:24 -05:00
Allow non-humanoid models to use humanoid animations
This commit is contained in:
parent
115f1e305c
commit
373dfc7da3
3 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -30,6 +30,9 @@ namespace ClassicalSharp.Model {
|
|||
/// <summary> Whether this entity requires downloading of a skin texture. </summary>
|
||||
public bool UsesSkin = true;
|
||||
|
||||
/// <summary> Whether humanoid animations should be calculated, instead of normal animations. </summary>
|
||||
public bool CalcHumanAnims;
|
||||
|
||||
/// <summary> Gravity applied to this entity. </summary>
|
||||
public virtual float Gravity { get { return 0.08f; } }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue