nvs / gem

Gem TD+: A Warcraft III Tower Defense
https://discord.gg/PxNNp77
26 stars 2 forks source link

Save/load in single-player broke in 1.6.6 #571

Open nvs opened 3 years ago

nvs commented 3 years ago

Something in 1.6.6 broke save/load. In both 1.31 and 1.32 patches. Did not check earlier.

nvs commented 3 years ago

Save/load broke in dd3f1a51fac96779e134a6090e7d0a3c225d5d93. The issue is that the referenced frame goes out of scope upon loading a game. Every map played that uses a timerdialog, Gem or not, increases the context number of the frame. Thus the method used to determine the active frame. Thus it makes sense that this would no longer be correct after loading.

Initial testing has not found a simple way to get the next timerdialog frame. Then again, I didn't look into it much. Simple tests using EVENT_GAME_LOADED did not work as expected. The simplest solution is just to revert to the old method, as the black screen upon unloading is no longer an issue in 1.32.