mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
move this up so it returns early
This commit is contained in:
parent
687151c36b
commit
9910323ebc
@ -216,12 +216,6 @@ namespace NewHorizons.Builder.Props
|
||||
/// </summary>
|
||||
private static void FixSectoredComponent(Component component, Sector sector, bool isTorch, bool keepLoaded)
|
||||
{
|
||||
// fix Sector stuff, eg SectorCullGroup (without this, props that have a SectorCullGroup component will become invisible inappropriately)
|
||||
if (component is ISectorGroup sectorGroup)
|
||||
{
|
||||
sectorGroup.SetSector(sector);
|
||||
}
|
||||
|
||||
// keepLoaded should remove existing groups
|
||||
// renderers/colliders get enabled later so we dont have to do that here
|
||||
if (keepLoaded && component is SectorCullGroup or SectorCollisionGroup or SectorLightsCullGroup)
|
||||
@ -230,6 +224,12 @@ namespace NewHorizons.Builder.Props
|
||||
return;
|
||||
}
|
||||
|
||||
// fix Sector stuff, eg SectorCullGroup (without this, props that have a SectorCullGroup component will become invisible inappropriately)
|
||||
if (component is ISectorGroup sectorGroup)
|
||||
{
|
||||
sectorGroup.SetSector(sector);
|
||||
}
|
||||
|
||||
// Not doing else if here because idk if any of the classes below implement ISectorGroup
|
||||
|
||||
if (component is Sector s)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user