mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-30 13:20:52 +00:00
- fixed: Change FCheckPosition::LastRipped to a TMap so that it can track multiple overlapping actors being ripped during the same tic.
This commit is contained in:
parent
06fdb6ca45
commit
46024398fe
3 changed files with 5 additions and 5 deletions
|
@ -70,7 +70,7 @@ void AFastProjectile::Tick ()
|
||||||
{
|
{
|
||||||
if (--ripcount <= 0)
|
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))
|
if (!P_TryMove (this, X() + xfrac,Y() + yfrac, true, NULL, tm))
|
||||||
|
|
|
@ -445,13 +445,12 @@ struct FCheckPosition
|
||||||
// [RH] These are used by PIT_CheckThing and P_XYMovement to apply
|
// [RH] These are used by PIT_CheckThing and P_XYMovement to apply
|
||||||
// ripping damage once per tic instead of once per move.
|
// ripping damage once per tic instead of once per move.
|
||||||
bool DoRipping;
|
bool DoRipping;
|
||||||
AActor *LastRipped;
|
TMap<AActor*, bool> LastRipped;
|
||||||
int PushTime;
|
int PushTime;
|
||||||
|
|
||||||
FCheckPosition(bool rip=false)
|
FCheckPosition(bool rip=false)
|
||||||
{
|
{
|
||||||
DoRipping = rip;
|
DoRipping = rip;
|
||||||
LastRipped = NULL;
|
|
||||||
PushTime = 0;
|
PushTime = 0;
|
||||||
FromPMove = false;
|
FromPMove = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1286,9 +1286,10 @@ bool PIT_CheckThing(AActor *thing, FCheckPosition &tm)
|
||||||
{
|
{
|
||||||
if (!(tm.thing->flags6 & MF6_NOBOSSRIP) || !(thing->flags2 & MF2_BOSS))
|
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) &&
|
if (!(thing->flags & MF_NOBLOOD) &&
|
||||||
!(thing->flags2 & MF2_REFLECTIVE) &&
|
!(thing->flags2 & MF2_REFLECTIVE) &&
|
||||||
!(tm.thing->flags3 & MF3_BLOODLESSIMPACT) &&
|
!(tm.thing->flags3 & MF3_BLOODLESSIMPACT) &&
|
||||||
|
|
Loading…
Reference in a new issue