WondaMegapon / Refightilization

A Risk of Rain 2 mod to allow players to respawn as a monster when they die.
GNU General Public License v3.0
5 stars 4 forks source link

TakeBlacklistedItems breaks respawning (NullReferenceException) #53

Open Bnyuun opened 1 month ago

Bnyuun commented 1 month ago

Greetings,

The recent update seems to have broken the blacklist check by giving it a NullReferenceException. I tested it on a dummy profile with just that mod and Aerolt (A Cheat/Debugging mod) including it's dependencies. I gave myself Razorwire since that Item is listed in the .cfg as a blacklisted item (cfg was also unchanged for this test). After dying, the game puts myself in spectator mode, unable to respawn. Removing it from my inventory, reviving myself and dying again makes it possible again to respawn as a mob. Tested this multiple times with success. Only when any blacklisted item (Razorwire, Potion, Watch, ...) gets added does that happen.

This issue also occured when playing with my friends yesterday.

Error Message:

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: Wonda.Refightilization.TakeBlacklistedItems (RoR2.CharacterMaster player) (at <733529e39bf0416dab2b137880400b5e>:IL_0074) Wonda.Refightilization.RefightRespawn (RoR2.CharacterMaster player, UnityEngine.Vector3 deathPos) (at <733529e39bf0416dab2b137880400b5e>:IL_01C0) Wonda.Refightilization+d__38.MoveNext () (at <733529e39bf0416dab2b137880400b5e>:IL_0229) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at :IL_0026)

Full Logs: log error.txt