From fdac1dd6e6be935b179c0a6c3fe4ba2c06848257 Mon Sep 17 00:00:00 2001 From: coderCleric Date: Mon, 15 May 2023 17:52:36 -0600 Subject: [PATCH] Fixed angler animation events disconnecting for added fish --- NewHorizons/Builder/Props/DetailBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Builder/Props/DetailBuilder.cs b/NewHorizons/Builder/Props/DetailBuilder.cs index 1d3df4fa..2cb79c45 100644 --- a/NewHorizons/Builder/Props/DetailBuilder.cs +++ b/NewHorizons/Builder/Props/DetailBuilder.cs @@ -363,7 +363,7 @@ namespace NewHorizons.Builder.Props else if(component is Shape shape) shape.enabled = true; // If it's not a moving anglerfish make sure the anim controller is regular - else if(component is AnglerfishAnimController && component.GetComponentInParent() == null) + else if(component is AnglerfishAnimController && component.transform.parent.GetComponent() == null) //Manual parent chain so we can find inactive { component.gameObject.AddComponent(); } @@ -380,7 +380,7 @@ namespace NewHorizons.Builder.Props public void Start() { var angler = GetComponent(); - + NHLogger.LogVerbose("Fixing anglerfish animation"); // Remove any event reference to its angler