Skip to content

Duke3D: Prevent savemapstate from executing during end of level.

Dino Bollinger requested to merge dibollinger/eduke32:savemapstate_check into master

This addresses #112 (closed) in that it prevents accidentally overwriting the wrong map slot on level change, and outputs an error into the log should such a situation occur. The modder can then fix the problem on their end.

From what I can tell, I don't think there is any value that always correctly identifies which level the player is "physically" still on. The closest is ud.level_number and ud.volume_number, which are used in the savemapstate code, but which are incremented shortly before the player actually changes the map.

Therefore I don't think #112 (closed) can be fully prevented without major changes, but we can prevent accidental triggering of the issue to prevent potential confusion.

Edited by Dino Bollinger

Merge request reports