mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-12 21:01:00 +00:00
fix infinite bounce rings
This commit is contained in:
parent
00516e5e9f
commit
a595f2369c
2 changed files with 4 additions and 4 deletions
|
@ -2494,7 +2494,7 @@ static inline boolean P_TagDamage(mobj_t *target, mobj_t *inflictor, mobj_t *sou
|
|||
if (!(inflictor->flags & MF_FIRE))
|
||||
P_GivePlayerRings(player, 1);
|
||||
if (inflictor->flags2 & MF2_BOUNCERING)
|
||||
inflictor->fuse = 1;
|
||||
inflictor->fuse = 0; // bounce ring disappears at -1 not 0
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2577,7 +2577,7 @@ static inline boolean P_PlayerHitsPlayer(mobj_t *target, mobj_t *inflictor, mobj
|
|||
if (!(inflictor->flags & MF_FIRE))
|
||||
P_GivePlayerRings(target->player, 1);
|
||||
if (inflictor->flags2 & MF2_BOUNCERING)
|
||||
inflictor->fuse = 1;
|
||||
inflictor->fuse = 0; // bounce ring disappears at -1 not 0
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1712,7 +1712,7 @@ void P_XYMovement(mobj_t *mo)
|
|||
mo->threshold++;
|
||||
|
||||
// Gain lower amounts of time on each bounce.
|
||||
if (mo->threshold < 5)
|
||||
if (mo->fuse && mo->threshold < 5)
|
||||
mo->fuse += ((5 - mo->threshold) * TICRATE);
|
||||
|
||||
// Check for hit against sky here
|
||||
|
@ -2185,7 +2185,7 @@ static boolean P_ZMovement(mobj_t *mo)
|
|||
|
||||
// Be sure to change the XY one too if you change this.
|
||||
// Gain lower amounts of time on each bounce.
|
||||
if (mo->threshold < 5)
|
||||
if (mo->fuse && mo->threshold < 5)
|
||||
mo->fuse += ((5 - mo->threshold) * TICRATE);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue