Core: Fix timing on footsteps.

This commit is contained in:
Goodlyay 2016-11-08 21:19:37 -08:00
parent 96710328a8
commit afc1100a8b

View file

@ -39,8 +39,16 @@ namespace ClassicalSharp.Entities {
if( p.curSwing < 0.999f ) return enoughDist;
// have our legs just crossed over the '0' point?
float oldLegRot = (float)Math.Cos( p.anim.walkTimeO );
float newLegRot = (float)Math.Cos( p.anim.walkTimeN );
float oldLegRot;
float newLegRot;
if( game.Camera.IsThirdPerson ) {
oldLegRot = (float)Math.Cos( p.anim.walkTimeO );
newLegRot = (float)Math.Cos( p.anim.walkTimeN );
}
else {
oldLegRot = (float)Math.Sin( p.anim.walkTimeO );
newLegRot = (float)Math.Sin( p.anim.walkTimeN );
}
return Math.Sign( oldLegRot ) != Math.Sign( newLegRot );
}