Merge branch 'nerf-stacked-invinc' into 'master'

Reduce time gain on stacked invincibility

See merge request KartKrew/Kart!1985
This commit is contained in:
Oni 2024-03-03 03:09:26 +00:00
commit 00643195a5
2 changed files with 4 additions and 3 deletions

View file

@ -6747,7 +6747,7 @@ void K_DoInvincibility(player_t *player, tic_t time)
S_StartSound(player->mo, sfx_alarmi);
}
player->invincibilitytimer += time;
player->invincibilitytimer = time;
}
void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source)
@ -12134,7 +12134,8 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
UINT32 behindScaled = behind * TICRATE / 4000;
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);
player->itemamount--;
player->botvars.itemconfirm = 0;

View file

@ -67,7 +67,7 @@ void K_GivePowerUp(player_t* player, kartitems_t powerup, tic_t time)
case POWERUP_SMONITOR:
S_StartSound(NULL, sfx_bpwrua);
K_AddMessageForPlayer(player, "Got S MONITOR!", true, false);
K_DoInvincibility(player, time);
K_DoInvincibility(player, player->invincibilitytimer + time);
player->powerup.superTimer += time;
break;