Outer-Wilds-New-Horizons / new-horizons

A tool for modifying or creating new planets, dialogue, ship logs, and more for Outer Wilds.
https://nh.outerwildsmods.com/
MIT License
42 stars 18 forks source link

"None" vine prefab causes NRE on dimension enter #562

Closed coderCleric closed 1 year ago

coderCleric commented 1 year ago

What Happened?

When I entered a dimension that I had set to have the "none" vine prefab, I got an NRE. This caused the bramble dimension to not properly load in, leaving me drifting in empty fog. I checked using the "cluster" prefab and that one worked fine, so I think it's specifically a problem with having no vines.

What was supposed to happen?

I should have entered the dimension without vines, with it loading properly.

Platform

Steam

Mods

NH and its dependencies, Nomai Text Printer, and my custom addon.

Logs

NullReferenceException
Stacktrace: NewHorizons.Components.BrambleSectorController.EnableRenderers () (at <af3dbe99d59e4e0eacbeb75214ec8b8d>:0)
NewHorizons.Components.BrambleSectorController.OnSectorOccupantsUpdated () (at <af3dbe99d59e4e0eacbeb75214ec8b8d>:0)
OWEvent.Invoke () (at <8585b6cb325949f692883e4747187a22>:0)
UnityEngine.Debug:LogException(Exception)
OWEvent:Invoke()
Sector:AddOccupant(SectorDetector)
Sector:OnEntry(GameObject)
OWTriggerVolume:FireEntryEvent(GameObject)
OWTriggerVolume:AddObjectToVolume(GameObject)
FogWarpVolume:DMD<FogWarpVolume::ReceiveWarpedDetector>(FogWarpVolume, FogWarpDetector, Vector3, Vector3, Quaternion)
FogWarpVolume:DMD<FogWarpVolume::WarpDetector>(FogWarpVolume, FogWarpDetector, FogWarpVolume)
SphericalFogWarpVolume:CheckWarpProximity(FogWarpDetector)
InnerFogWarpVolume:CheckWarpProximity(FogWarpDetector)
FogWarpDetector:FixedUpdate()
JohnCorby commented 1 year ago

clearly there's a null renderer somewhere but im not sure how BrambleSectorController coulda picked up the renderer before it was destroyed given we do the vine none stuff before adding BrambleSectorController

coderCleric commented 1 year ago

I'm not sure if it's helpful, but it was actually working before the 1.10.0 update.

JohnCorby commented 1 year ago

thats probably related to this fix then, which was to fix nodes in the dimension showing up even if you werent in it. maybe we need to put that code back into the delay or something