rotation, quick reset, better handling of offset values

This commit is contained in:
Platinum 2020-05-30 14:10:22 -07:00
parent 2e18be1953
commit f22f5ac33e
6 changed files with 66 additions and 26 deletions

View file

@ -44,11 +44,6 @@ namespace Rimworld_Animations {
bodyAnim.tickGraphics(graphics);
bodyAnim.animatePawn(ref rootLoc, ref angle, ref bodyFacing, ref headFacing);
if(bodyAnim.CurrentAnimation?.actors[bodyAnim.ActorIndex]?.offsetsByDefName != null && bodyAnim.CurrentAnimation.actors[bodyAnim.ActorIndex].offsetsByDefName.ContainsKey(pawn.def.defName)) {
rootLoc.x += bodyAnim.CurrentAnimation.actors[bodyAnim.ActorIndex].offsetsByDefName[pawn.def.defName].x;
rootLoc.z += bodyAnim.CurrentAnimation.actors[bodyAnim.ActorIndex].offsetsByDefName[pawn.def.defName].y;
}
}
}