use Boom's P_UnsetThingPosition()/P_SetThingPosition() for Boom and earlier#2261
use Boom's P_UnsetThingPosition()/P_SetThingPosition() for Boom and earlier#2261fabiangreffrath wants to merge 8 commits intomasterfrom
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 |
… vanilla_blockmap
No description provided.