extra null ref checks and tweaks

This commit is contained in:
Platinum 2020-05-29 13:12:35 -07:00
parent e006e54020
commit 8ed4ebb5c2
5 changed files with 18 additions and 9 deletions

View file

@ -17,6 +17,12 @@ namespace Rimworld_Animations {
public static bool Prefix(ref JobDriver_Sex __instance, ref Pawn pawn, ref Thing target, ref bool pawnnude, ref bool partnernude) {
Pawn pawn2 = target as Pawn;
if (pawn == null || pawn2 == null) {
return true;
}
if (pawn.IsHashIntervalTick(__instance.ticks_between_thrusts)) {
__instance.Animate(pawn, pawn2);