mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
rotation, quick reset, better handling of offset values
This commit is contained in:
parent
2e18be1953
commit
f22f5ac33e
6 changed files with 66 additions and 26 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,11 +18,6 @@ namespace Rimworld_Animations {
|
|||
if (bodyAnim != null && bodyAnim.isAnimating) {
|
||||
__result = ___pawn.TryGetComp<CompBodyAnimator>().anchor + ___pawn.TryGetComp<CompBodyAnimator>().deltaPos;
|
||||
|
||||
if (bodyAnim.CurrentAnimation?.actors[bodyAnim.ActorIndex]?.offsetsByDefName != null && bodyAnim.CurrentAnimation.actors[bodyAnim.ActorIndex].offsetsByDefName.ContainsKey(___pawn.def.defName)) {
|
||||
__result.x += bodyAnim.CurrentAnimation.actors[bodyAnim.ActorIndex].offsetsByDefName[___pawn.def.defName].x;
|
||||
__result.z += bodyAnim.CurrentAnimation.actors[bodyAnim.ActorIndex].offsetsByDefName[___pawn.def.defName].y;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue