mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
K_DoInvincibility: fix S-Monitor power-up after time gain change
This commit is contained in:
parent
36c6af6eae
commit
f3548d2ec8
2 changed files with 4 additions and 3 deletions
|
|
@ -6729,7 +6729,7 @@ void K_DoInvincibility(player_t *player, tic_t time)
|
||||||
S_StartSound(player->mo, sfx_alarmi);
|
S_StartSound(player->mo, sfx_alarmi);
|
||||||
}
|
}
|
||||||
|
|
||||||
player->invincibilitytimer = max(time, player->invincibilitytimer + 5*TICRATE);
|
player->invincibilitytimer = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source)
|
void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source)
|
||||||
|
|
@ -12079,7 +12079,8 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
UINT32 behindScaled = behind * TICRATE / 4000;
|
UINT32 behindScaled = behind * TICRATE / 4000;
|
||||||
behindScaled = min(behindScaled, 10*TICRATE);
|
behindScaled = min(behindScaled, 10*TICRATE);
|
||||||
|
|
||||||
K_DoInvincibility(player, 10 * TICRATE + behindScaled);
|
K_DoInvincibility(player,
|
||||||
|
max(10u * TICRATE + behindScaled, player->invincibilitytimer + 5u*TICRATE));
|
||||||
K_PlayPowerGloatSound(player->mo);
|
K_PlayPowerGloatSound(player->mo);
|
||||||
player->itemamount--;
|
player->itemamount--;
|
||||||
player->botvars.itemconfirm = 0;
|
player->botvars.itemconfirm = 0;
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ void K_GivePowerUp(player_t* player, kartitems_t powerup, tic_t time)
|
||||||
{
|
{
|
||||||
case POWERUP_SMONITOR:
|
case POWERUP_SMONITOR:
|
||||||
K_AddMessageForPlayer(player, "Got S MONITOR!", true, false);
|
K_AddMessageForPlayer(player, "Got S MONITOR!", true, false);
|
||||||
K_DoInvincibility(player, time);
|
K_DoInvincibility(player, player->invincibilitytimer + time);
|
||||||
player->powerup.superTimer += time;
|
player->powerup.superTimer += time;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue