45362ac37b
Using `sav_objnum` caused the player to be restored into the object slot of the pre-load level, in the object table of the post-load level. This was harmless when the slots were the same, and wrong when they were not. It became noticeably wrong when more player data was moved into the object. After those changes, the player's data was stored into the correct post-load slot, but the ship was assigned to the pre-load slot. Remove the incorrect slot switch, and add an assert that the object being overwritten is a player ghost. With the incorrect switch present, this assert will catch most (but not all)[1] cases of the incorrect restore. With the incorrect switch removed, this assert succeeds. [1] In the unlikely case that the post-load slot was a player start, but for a different player, the assert could succeed despite the slot mismatch bug. In the common case, the post-load slot would not be a start of a different player; it would either be the correct player slot, in which case `sav_objnum` was harmless, or it would be some other object, such as a robot. |
||
---|---|---|
.. | ||
2d | ||
3d | ||
arch | ||
editor | ||
main | ||
misc |