check InConversation to avoid unnecessary EndConversation calls (#859)

even though this already happens in CharacterDialogueTree.EndConversation itself, I did it for Ixrec anyways.
This commit is contained in:
Noah Pilarski 2024-06-01 22:17:20 -04:00
parent fb9e10fee7
commit fc1f25a70d

View File

@ -23,9 +23,12 @@ public static class CharacterDialogueTreePatches
} }
private static void OnAttachPlayerToPoint(this CharacterDialogueTree characterDialogueTree, OWRigidbody rigidbody) private static void OnAttachPlayerToPoint(this CharacterDialogueTree characterDialogueTree, OWRigidbody rigidbody)
{
if (characterDialogueTree.InConversation())
{ {
characterDialogueTree.EndConversation(); characterDialogueTree.EndConversation();
} }
}
[HarmonyPostfix] [HarmonyPostfix]
[HarmonyPatch(nameof(CharacterDialogueTree.StartConversation))] [HarmonyPatch(nameof(CharacterDialogueTree.StartConversation))]