Check InConversation to avoid unnecessary EndConversation calls (#877)

## Improvements

- fix #859: CharacterDialogueTree.InConversation is now checked in our
attachment patch to avoid unnecessary EndConversation calls.
This commit is contained in:
xen-42 2024-06-03 22:46:04 -04:00 committed by GitHub
commit fef13f6710
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,10 @@ public static class CharacterDialogueTreePatches
private static void OnAttachPlayerToPoint(this CharacterDialogueTree characterDialogueTree, OWRigidbody rigidbody) private static void OnAttachPlayerToPoint(this CharacterDialogueTree characterDialogueTree, OWRigidbody rigidbody)
{ {
characterDialogueTree.EndConversation(); if (characterDialogueTree.InConversation())
{
characterDialogueTree.EndConversation();
}
} }
[HarmonyPostfix] [HarmonyPostfix]