public override void MentalStateTick() { bool flag = false; if (base.pawn.IsHashIntervalTick(500) && !CorpseObsessionMentalStateUtility.IsCorpseValid(this.corpse, base.pawn, false)) { this.corpse = CorpseObsessionMentalStateUtility.GetClosestCorpseToDigUp(base.pawn); if (this.corpse == null) { base.RecoverFromState(); flag = true; } } if (!flag) { base.MentalStateTick(); } }
public override void MentalStateTick() { if (alreadyHauledCorpse) { base.MentalStateTick(); return; } bool flag = false; if (pawn.IsHashIntervalTick(500) && !CorpseObsessionMentalStateUtility.IsCorpseValid(corpse, pawn)) { corpse = CorpseObsessionMentalStateUtility.GetClosestCorpseToDigUp(pawn); if (corpse == null) { RecoverFromState(); flag = true; } } if (!flag) { base.MentalStateTick(); } }