Engine: Per-map art previous board filename is not updated when starting a map without loading a save
Forum Thread: https://forums.duke4.net/topic/10927-per-map-art-oversight-on-savegame-load/
When a new map is started, the per-map art tiles are cleared or overridden, but the previousboardfilename
variable is not updated.
This can cause a problem when one does the following:
- Load a save of a map with per-map art defined.
previousboardfilename
is updated to the current map's filename. - Start a new map through the newgame menu, or transition to another map through level exit. The per-map art tiles are cleared.
- Now load the save. Since
previousboardfilename
still holds the filename of the map in the save, the per-map tiles are not reloaded. This can result in a hall-of-mirrors effect, or the wrong textures appearing in place of the per-map tiles.
This variable was originally devised as a band-aid fix to cache pollution when savegames of maps with per-map tiles defined were loaded repeatedly. A solution would be to update previousboardfilename
on every map load, and not just when a savegame is loaded.
Here's the map to reproduce the problem: https://forums.duke4.net/index.php?app=core&module=attach§ion=attach&attach_id=14516
Edited by Dino Bollinger