Fixed angler animation events disconnecting for added fish

This commit is contained in:
coderCleric 2023-05-15 17:52:36 -06:00
parent 3bfd688e57
commit fdac1dd6e6

View File

@ -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<AnglerfishController>() == null)
else if(component is AnglerfishAnimController && component.transform.parent.GetComponent<AnglerfishController>() == null) //Manual parent chain so we can find inactive
{
component.gameObject.AddComponent<AnglerAnimFixer>();
}