2020-04-09 00:43:01 +00:00
|
|
|
|
using HarmonyLib;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using Verse;
|
|
|
|
|
|
|
|
|
|
namespace Rimworld_Animations {
|
|
|
|
|
|
|
|
|
|
[HarmonyPatch(typeof(Pawn_DrawTracker), "DrawPos", MethodType.Getter)]
|
|
|
|
|
public static class HarmonyPatch_Pawn_DrawTracker {
|
|
|
|
|
public static bool Prefix(ref Pawn ___pawn, ref Vector3 __result) {
|
|
|
|
|
|
2020-05-30 06:27:06 +00:00
|
|
|
|
CompBodyAnimator bodyAnim = ___pawn.TryGetComp<CompBodyAnimator>();
|
|
|
|
|
|
|
|
|
|
if (bodyAnim != null && bodyAnim.isAnimating) {
|
2020-04-09 00:43:01 +00:00
|
|
|
|
__result = ___pawn.TryGetComp<CompBodyAnimator>().anchor + ___pawn.TryGetComp<CompBodyAnimator>().deltaPos;
|
2020-05-30 06:27:06 +00:00
|
|
|
|
|
2020-04-09 00:43:01 +00:00
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|