right that would make sense lol

This commit is contained in:
Noah Pilarski 2025-02-15 02:29:20 -05:00
parent c93689037b
commit e4407995d5

View File

@ -515,8 +515,8 @@ namespace NewHorizons.Handlers
_triggerRoot = gameObject; _triggerRoot = gameObject;
_subsectors = new List<Sector>(); _subsectors = new List<Sector>();
_occupantMask = DynamicOccupant.Player; _occupantMask = DynamicOccupant.Player;
var parentSector = GetComponentInParent<Sector>(); var parentSector = GetComponentsInParent<Sector>().FirstOrDefault(parentSector => parentSector != this);
if (parentSector != null && parentSector != this) if (parentSector != null)
{ {
_parentSector = parentSector; _parentSector = parentSector;
_parentSector.AddSubsector(this); _parentSector.AddSubsector(this);