mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-23 09:34:35 -05:00
Core: Fix timing on footsteps.
This commit is contained in:
parent
96710328a8
commit
afc1100a8b
1 changed files with 10 additions and 2 deletions
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue