bloodypenguin / Skylines-MetroOverhaulMod

Metro Overhaul Mod for Cities: Skylines
http://steamcommunity.com/sharedfiles/filedetails/?id=816260433
GNU General Public License v3.0
66 stars 18 forks source link

[BUG] Infinite loop while loading a savegame #35

Open krzychu124 opened 3 years ago

krzychu124 commented 3 years ago

If something go wrong and NetInfo of the node will be null (possible if not all assets are subscribed/enabled) this method will cause infinite loop - game never finish loading a savegame. I've noticed that while testing the user savegame https://github.com/bloodypenguin/Skylines-MetroOverhaulMod/blob/c94dea3be1d4a17ed89faec6b6bfef53235c466c/AssetsUpdater.cs#L430-L451 The instruction from line 447 should be placed outside of if (node.Info != null) check to prevent infinite loop.

Similar situation you can find just a few lines below but the code is correct there. https://github.com/bloodypenguin/Skylines-MetroOverhaulMod/blob/c94dea3be1d4a17ed89faec6b6bfef53235c466c/AssetsUpdater.cs#L452-L470