SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
85 stars 18 forks source link

LevelInfo.resolveAsset bug #4273

Closed Alniroza closed 9 months ago

Alniroza commented 9 months ago

When you host a server using a workshop map that doesnt get found, the map will be set to the default 'PEI', if a player connects to this map and then you restart the server so its set to the one you really wanted (ex. Arid), the players will still see the recipes from PEI, even if the property to hide core is set correctly on the Bundle.

I tried deleting all map related info from Levels and Players, but this didnt work.

SDGNelson commented 9 months ago

To double-check: you have a custom version of the level with a Crafting Blacklist Asset and Allow_Core_Blueprints set to false?

Alniroza commented 9 months ago

I had one who used Arid Bundle, with it activated. I added the Allow_Core to this new Bundle (Arid 3.0) to test it, and didnt fix nothing.

This has happened me before with the Curated Arid too.

SDGNelson commented 9 months ago

Ah! I think I see what's happening.

LevelInfo.resolveAsset caches its result which was fine before the level list was changed to only refresh as-needed, but now the resolveAsset result can be invalid when different assets are loaded. I'll move it to be cached and reset when the level itself is loaded.