PARANOIA: do mobj scramble last

This commit is contained in:
James R 2023-02-14 00:49:19 -08:00
parent 0b2273b848
commit 98a4a90129

View file

@ -11190,12 +11190,6 @@ void P_RemoveMobj(mobj_t *mobj)
P_SetTarget(&mobj->itnext, NULL);
// DBG: set everything in mobj_t to 0xFF instead of leaving it. debug memory error.
#ifdef SCRAMBLE_REMOVED
// Invalidate mobj_t data to cause crashes if accessed!
memset((UINT8 *)mobj + sizeof(thinker_t), 0xff, sizeof(mobj_t) - sizeof(thinker_t));
#endif
P_RemoveThingTID(mobj);
R_RemoveMobjInterpolator(mobj);
@ -11215,6 +11209,12 @@ void P_RemoveMobj(mobj_t *mobj)
}
P_RemoveThinker((thinker_t *)mobj);
// DBG: set everything in mobj_t to 0xFF instead of leaving it. debug memory error.
#ifdef SCRAMBLE_REMOVED
// Invalidate mobj_t data to cause crashes if accessed!
memset((UINT8 *)mobj + sizeof(thinker_t), 0xff, sizeof(mobj_t) - sizeof(thinker_t));
#endif
}
// This does not need to be added to Lua.