mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Ring Award/Drain special: For negative rings, nonzero args[2] makes the minimum value -20 instead of 0
Requested in VC for Drifting Tutorial
This commit is contained in:
parent
146666fad4
commit
46f7b3a519
1 changed files with 6 additions and 3 deletions
|
|
@ -4132,14 +4132,17 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
}
|
||||
else
|
||||
{
|
||||
// args[2]: cap rings to -20 instead of 0
|
||||
SINT8 baseline = (args[2] ? -20 : 0);
|
||||
|
||||
// Don't push you below baseline
|
||||
if (mo->player->rings <= 0)
|
||||
if (mo->player->rings <= baseline)
|
||||
return false;
|
||||
|
||||
rings = -(rings);
|
||||
|
||||
if (rings > mo->player->rings)
|
||||
rings = mo->player->rings;
|
||||
if (rings > (mo->player->rings - baseline))
|
||||
rings = (mo->player->rings - baseline);
|
||||
|
||||
mo->player->rings -= rings;
|
||||
S_StartSound(mo, sfx_antiri);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue