From ac1fdc99be3947b4182c548d41c86506f70db747 Mon Sep 17 00:00:00 2001 From: Vegapnk Date: Sun, 22 Jan 2023 09:06:02 +0100 Subject: [PATCH] Added check for animals in orgasm rush, should fix #15 --- Source/Genes/Special/Patch_OrgasmRush.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Genes/Special/Patch_OrgasmRush.cs b/Source/Genes/Special/Patch_OrgasmRush.cs index 3caaa68..eaf6216 100644 --- a/Source/Genes/Special/Patch_OrgasmRush.cs +++ b/Source/Genes/Special/Patch_OrgasmRush.cs @@ -19,8 +19,12 @@ namespace RJW_Genes public static void Postfix(SexProps props) { - // ShortCuts: Exit Early if Pawn or Partner are null (can happen with Animals or Masturbation) - if (props.pawn == null || !props.hasPartner()) + // ShortCuts: Exit Early if Pawn or Partner are null (can happen with Masturbation or other nieche-cases) + if (props == null || props.pawn == null || !props.hasPartner()) + return; + + // Exit for Animals - Animals can't get or trigger Orgasm Rushes. Fixes #15 + if (props.pawn.IsAnimal() || props.partner.IsAnimal()) return; if (props.pawn.genes != null && props.pawn.genes.HasGene(GeneDefOf.rjw_genes_orgasm_rush))