Reloading a save that includes active Icon of Sin crashes
Created attachment 579 [details]
icon of sin crash
Go to map30
activate icon of sin
let a cube spawn in
save the game
load the game
Crash log provided.
Created attachment 581 [details]
Save game seconds before a Cube spawns a mob
Save game where a Cube is about to spawn a mob in front of the player
I've narrowed down the cause but not a solution yet.
The moment a Cube spawns an enemy, it should have an AActorPtr for the target coordinates of where to spawn it. For some reason, this pointers is null after loading the save game -- triggering the crash (in `A_SpawnFly()`)
I haven't been able to check yet whether the target coordinates are saved for Cubes, or if they're just not initialized properly.
I suddenly realized that the target of a Revenant's missile also doesn't survive and save and load, so this "bug" is not unique. It's just that a missile will just become non-homing and explode at some point. But what about the a Cube? Should we just remove it on load?
Given the data saved behaviour on Odamex tries to mimic Doom 2's at best, if it doesn't target anything, it's destroyed, and thus, seems entirely fine.
Just to track down stuff easily, here is Terr's PR : https://github.com/odamex/odamex/pull/109
Merged into development branch.