Spawn spots not preserved in saved games

Doom automatically generates a list of all spawn spots for any final bosses present at the beginning of each map, but it neglects to do this again when loading a saved game. This means that any such bosses on the map will become inoperative. In addition, if there are any spawn cubes currently in flight, the game will crash due to the fact that the cube's target field is used to track the spot at which it will spawn a monster, and targets are not recorded in saved games. The SpawnFly codepointer neglects to check that the cube's target is valid before using it, causing it to access a NULL pointer.

In addition, it's possible to induce a venetian blinds crash due to a division by zero. When normally awakened, the cube spitter counts and stores the number of spawn spots in a variable called numtargets. When loading a saved game, this variable is not checked for consistency, and will just keep whatever value it had. On a freshly started Doom, this value is zero, otherwise it's the last calculated value. This causes saved games with activated Icon of Sins to work, but exiting and restarting Doom and reloading such a game will result in a division by zero, because numtargets is initialized to a value of zero, and is NOT recomputed unless the boss brain is properly woken up.