harbingerofme / R2Mods

Harb's mods for Risk of Rain 2
GNU General Public License v3.0
1 stars 4 forks source link

Fixed an issue with hooks not removing on run end #18

Closed KingEnderBrine closed 3 years ago

KingEnderBrine commented 3 years ago

The issue was that if you leave from the game to the main menu NetworkServer.active is false when onRunDestroyGlobal is executed. So, I've changed a check to remove hooks if they are applied.

Though, unsubscribing from hooks even if you not subscribed will not throw an error and work just fine. But that's up to you if you want remove that check completely.