Skip to content

Commit

Permalink
Fixed Prepare Carefully compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
UnlimitedHugs committed Nov 23, 2020
1 parent a07bc56 commit 9cb7547
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/Patches/Pawn_Kill_Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ internal static class Pawn_Kill_Patch {
[HarmonyPostfix]
public static void UnforbidDraftedHuntBody(Pawn __instance, DamageInfo? dinfo) {
var perpetrator = dinfo?.Instigator as Pawn;
var worldSettings = AllowToolController.Instance.WorldSettings.PartyHunt;
if (perpetrator != null && worldSettings.UnforbidDrops && worldSettings.PawnIsPartyHunting(perpetrator)) {
var worldSettings = AllowToolController.Instance.WorldSettings?.PartyHunt;
if (perpetrator != null && worldSettings != null
&& worldSettings.UnforbidDrops && worldSettings.PawnIsPartyHunting(perpetrator)) {
__instance.Corpse?.SetForbidden(false, false);
}
}
Expand Down

0 comments on commit 9cb7547

Please sign in to comment.