diff --git a/src/g_shared/a_fastprojectile.cpp b/src/g_shared/a_fastprojectile.cpp index 725b858e3..1e536faa8 100644 --- a/src/g_shared/a_fastprojectile.cpp +++ b/src/g_shared/a_fastprojectile.cpp @@ -70,7 +70,7 @@ void AFastProjectile::Tick () { if (--ripcount <= 0) { - tm.LastRipped = NULL; // [RH] Do rip damage each step, like Hexen + tm.LastRipped.Clear(); // [RH] Do rip damage each step, like Hexen } if (!P_TryMove (this, X() + xfrac,Y() + yfrac, true, NULL, tm)) diff --git a/src/p_local.h b/src/p_local.h index c39bcef78..395a05990 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -445,13 +445,12 @@ struct FCheckPosition // [RH] These are used by PIT_CheckThing and P_XYMovement to apply // ripping damage once per tic instead of once per move. bool DoRipping; - AActor *LastRipped; + TMap LastRipped; int PushTime; FCheckPosition(bool rip=false) { DoRipping = rip; - LastRipped = NULL; PushTime = 0; FromPMove = false; } diff --git a/src/p_map.cpp b/src/p_map.cpp index 1aacff982..31f31e16c 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -1286,9 +1286,10 @@ bool PIT_CheckThing(AActor *thing, FCheckPosition &tm) { if (!(tm.thing->flags6 & MF6_NOBOSSRIP) || !(thing->flags2 & MF2_BOSS)) { - if (tm.LastRipped != thing) + bool *check = tm.LastRipped.CheckKey(thing); + if (check == NULL || !*check) { - tm.LastRipped = thing; + tm.LastRipped[thing] = true; if (!(thing->flags & MF_NOBLOOD) && !(thing->flags2 & MF2_REFLECTIVE) && !(tm.thing->flags3 & MF3_BLOODLESSIMPACT) &&