by Player701 » Sun Mar 24, 2019 2:55 pm
Starting from some commit after 3.7.2 - probably
this one but it's uncertain because some of the commits, including that one, crash when starting a map with the test WAD loaded - EventHandler::OnRegister is no longer called upon loading a save file after the corresponding EventHandler has been deserialized. This is a breaking change: my mod relies on OnRegister being called again to verify that the save file that has just been loaded was made with the same version of the mod that is being run now, and if it's not true, then a warning message is printed. This is achieved by storing the version string in the event handler itself, and comparing it with the version string retrieved from a static class included in the mod. Obviously, this feature no longer functions after the change.
Test WAD attached. In GZDoom 3.7.2, a message is printed to the console both when a level starts and when a save made on that level is loaded. In the latest git, no message is printed upon loading a save.
UPD: I have reimplemented the version check as a separate EventHandler method invoked from another (static) event handler in its WorldLoaded event. However, it would still be better if the original behavior could be restored.
- Attachments
-
onregister.wad
- (240 Bytes) Downloaded 27 times
Starting from some commit after 3.7.2 - probably [url=https://github.com/coelckers/gzdoom/commit/66eb4e5048ca3f673671930194346a2bb7375cdd]this one[/url] but it's uncertain because some of the commits, including that one, crash when starting a map with the test WAD loaded - EventHandler::OnRegister is no longer called upon loading a save file after the corresponding EventHandler has been deserialized. This is a breaking change: my mod relies on OnRegister being called again to verify that the save file that has just been loaded was made with the same version of the mod that is being run now, and if it's not true, then a warning message is printed. This is achieved by storing the version string in the event handler itself, and comparing it with the version string retrieved from a static class included in the mod. Obviously, this feature no longer functions after the change.
Test WAD attached. In GZDoom 3.7.2, a message is printed to the console both when a level starts and when a save made on that level is loaded. In the latest git, no message is printed upon loading a save.
[b]UPD:[/b] I have reimplemented the version check as a separate EventHandler method invoked from another (static) event handler in its WorldLoaded event. However, it would still be better if the original behavior could be restored.