New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
save/load bug in map02 AD_MORTEM.wad #339
Comments
Could this probably be fixed by properly saving mobj pointer indices for pushers as is already done for other thinkers? Line 2079 in c9455a7
|
It restores source mobj with P_GetPushThing: Line 2641 in c9455a7
|
Is this bug also in prboom+? If it is just pushers and not mbf21-specific, we should probably patch it there as well. |
This approach seems to be better |
Probably, I haven't tested. |
AD_MORTEM.wad has been updated, the bug is no longer reproducible: [doomworld] |
Okay, we don't need an over-engineered fix for a mapping error then. It would still be useful, though, to report a warning if |
Shouldn't this rather mean Lines 3238 to 3239 in c9455a7
|
AD_MORTENv2.wad map02 crashes on load with this change. So, are we call |
I guess we can do better than erroring out. Could you please upload the crashing WAD here, now that it has been replaced in the DW thread? |
I still don't quite get it. When spawning pushers, all sectors with the same tag as the corresponding special linedef are scanned for pusher things. And only if such a think is found, a thinker is spawned and the sector which holds the thing is stored in its Line 3273 in 4a4917c
Is it possible for pusher objects to move to a different sector? Or is it possible to remove them off the map or crush them, without their connected thinker getting removed? |
--- a/Source/p_saveg.c
+++ b/Source/p_saveg.c
@@ -1792,7 +1792,7 @@ static void saveg_write_pusher_t(pusher_t *str)
saveg_write32(str->y);
// int affectee;
- saveg_write32(str->affectee);
+ saveg_write32(str->source ? str->source->subsector->sector - sectors : str->affectee);
}
// |
This patch doesn't work for me. Try this save: woofsav0.zip |
Well, it's in the writer function, so it doesn't fix broken savegames. But newly saved games will be fine - at least as far as my testing went. |
That is a new save. If you save right in the moment of activation, pushers don't work after load. |
But isn't this rather because pushers got moved into a different sector that doesn't have |
I don't know, but my PR works for saves like that. |
With your PR, savegames saved with an old version and loaded with a patched one will still crash, right? So, we will still need a check if |
Eh, you're probably right about overengineering. This is an unconventional use of pushers, so maybe we just erroring out? |
Another idea: If |
I have implemented this in e580f49 |
WAD: [doomworld]
How to reproduce: at the beginning of map02 grab the Rocket Launcher which activates Cacodemos, save the game. Loading this save crashes the port.
Same bug in DSDA-Doom 0.21.3 and the latest build of Woof.
I think it's related to Pushers. @kraflab
The text was updated successfully, but these errors were encountered: