fixed beast anim error

This commit is contained in:
c0ffee 2022-10-25 13:11:55 -07:00
parent a4d308e64f
commit 9a6df8606d
2 changed files with 3 additions and 1 deletions

View file

@ -405,7 +405,9 @@ namespace Rimworld_Animations {
if(headFacing.IsHorizontal && mirror) { if(headFacing.IsHorizontal && mirror) {
headFacing = headFacing.Opposite; headFacing = headFacing.Opposite;
} }
headBob = new Vector3(0, 0, clip.HeadBob.Evaluate(clipPercent)) * pawn.story.bodyType.bodyGraphicScale; headBob = new Vector3(0, 0, clip.HeadBob.Evaluate(clipPercent));
Vector2 bodyOffset = (pawn.story?.bodyType?.bodyGraphicScale != null ? pawn.story.bodyType.bodyGraphicScale : Vector2.one);
headBob.z *= bodyOffset.x;
lastDrawFrame = RealTime.frameCount; lastDrawFrame = RealTime.frameCount;