-
Notifications
You must be signed in to change notification settings - Fork 55
use Boom's P_UnsetThingPosition()/P_SetThingPosition() for Boom and earlier #2261
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
base: master
Are you sure you want to change the base?
Conversation
|
This fixes the |
|
I only set the function pointers at the start of each map, so the COMP cheat continues to work. |
|
Has this change thoroughly demo-tested? (Or will it later?) Obviously it should be made in order to match up with vanilla, certainly, but of course there's the possibility that newer vanilla/boom demos that may get screwed by this -- I guess my question is "how many of the newer demos will be desynced?" This is also a similar consideration with the "planes differ" issue from DSDA (kraflab/dsda-doom#704) where in a implementation detail was quietly changed that caused backwards compat issues. |
This has been tested against all dsdarchive demos with dsda-doom. It fixes the demos that desync, and makes the game hang against a few other demos. This is expected, in vanilla those demos also hang. But having the game hang isnt a good thing, so I think the plan is to catch the expection with I_Error() |
--- a/src/p_maputl.c
+++ b/src/p_maputl.c
@@ -26,6 +26,7 @@
#include "doomdata.h"
#include "doomstat.h"
#include "i_printf.h"
+#include "i_system.h"
#include "m_bbox.h"
#include "p_map.h"
#include "p_maputl.h"
@@ -546,14 +547,18 @@ boolean blockmapfix;
boolean P_BlockThingsIterator(int x, int y, boolean func(mobj_t*),
boolean do_blockmapfix)
{
- mobj_t *mobj;
+ mobj_t *mobj, *first;
if (x < 0 || y < 0 || x >= bmapwidth || y >= bmapheight)
return true;
- for (mobj = blocklinks[y*bmapwidth+x]; mobj; mobj = mobj->bnext)
+ for (mobj = blocklinks[y*bmapwidth+x], first = mobj; mobj; mobj = mobj->bnext)
+ {
if (!func(mobj))
return false;
+ if (mobj->bnext == first)
+ I_Error("infitnite loop detected!");
+ }
// Blockmap bug fix by Terry Hearst
// https://github.com/fabiangreffrath/crispy-doom/pull/723 |
No description provided.