fix infinite bounce rings
This commit is contained in:
parent
00516e5e9f
commit
a595f2369c
|
@ -2494,7 +2494,7 @@ static inline boolean P_TagDamage(mobj_t *target, mobj_t *inflictor, mobj_t *sou
|
||||||
if (!(inflictor->flags & MF_FIRE))
|
if (!(inflictor->flags & MF_FIRE))
|
||||||
P_GivePlayerRings(player, 1);
|
P_GivePlayerRings(player, 1);
|
||||||
if (inflictor->flags2 & MF2_BOUNCERING)
|
if (inflictor->flags2 & MF2_BOUNCERING)
|
||||||
inflictor->fuse = 1;
|
inflictor->fuse = 0; // bounce ring disappears at -1 not 0
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2577,7 +2577,7 @@ static inline boolean P_PlayerHitsPlayer(mobj_t *target, mobj_t *inflictor, mobj
|
||||||
if (!(inflictor->flags & MF_FIRE))
|
if (!(inflictor->flags & MF_FIRE))
|
||||||
P_GivePlayerRings(target->player, 1);
|
P_GivePlayerRings(target->player, 1);
|
||||||
if (inflictor->flags2 & MF2_BOUNCERING)
|
if (inflictor->flags2 & MF2_BOUNCERING)
|
||||||
inflictor->fuse = 1;
|
inflictor->fuse = 0; // bounce ring disappears at -1 not 0
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1712,7 +1712,7 @@ void P_XYMovement(mobj_t *mo)
|
||||||
mo->threshold++;
|
mo->threshold++;
|
||||||
|
|
||||||
// Gain lower amounts of time on each bounce.
|
// Gain lower amounts of time on each bounce.
|
||||||
if (mo->threshold < 5)
|
if (mo->fuse && mo->threshold < 5)
|
||||||
mo->fuse += ((5 - mo->threshold) * TICRATE);
|
mo->fuse += ((5 - mo->threshold) * TICRATE);
|
||||||
|
|
||||||
// Check for hit against sky here
|
// 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.
|
// Be sure to change the XY one too if you change this.
|
||||||
// Gain lower amounts of time on each bounce.
|
// Gain lower amounts of time on each bounce.
|
||||||
if (mo->threshold < 5)
|
if (mo->fuse && mo->threshold < 5)
|
||||||
mo->fuse += ((5 - mo->threshold) * TICRATE);
|
mo->fuse += ((5 - mo->threshold) * TICRATE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue