fix infinite bounce rings

This commit is contained in:
Inuyasha 2016-05-12 13:52:41 -07:00
parent 00516e5e9f
commit a595f2369c
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;