viliger2 / RoR2_EnemiesReturns

Enemies mod for Risk of Rain 2.
Other
0 stars 2 forks source link

Mech Spider NRE #13

Closed goldenguy00 closed 2 hours ago

goldenguy00 commented 2 hours ago

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: EnemiesReturns.ModdedEntityStates.MechanicalSpider.DoubleShot.Fire.FixedUpdate () (at :IL_00A1) RoR2.EntityStateMachine.ManagedFixedUpdate (System.Single deltaTime) (at :IL_001D) RoR2.EntityStateMachine.FixedUpdate () (at :IL_0006)

just keeps getting spammed, probably died and cant exit the state cuz of nre

goldenguy00 commented 2 hours ago

ye its intangible body keeps on walkin {8FBD298C-390F-4465-8165-3E1FAE089CCB}

viliger2 commented 2 hours ago

Can you send the full log? I've added a nullcheck to the problematic line of code, but still, it should've left the state when it died. Instead it is stuck in that state, trying to fire, despite the fact that its master is long gone.

goldenguy00 commented 2 hours ago

zipped_log.zip

viliger2 commented 2 hours ago

My only guess is that spider died and somehow run state switch code on the same logical frame and instead of dying it is now stuck running around trying to shoot. With https://github.com/viliger2/RoR2_EnemiesReturns/commit/642e1bda7a73d3bdbd23b038e9a6a196400f206d I've added nullchecks to the state, but that doesn't fix the issue of masterless spider running around.

goldenguy00 commented 2 hours ago

sick