mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
K_DropPowerUps: remove invincibilitytimer along with "S"
This commit is contained in:
parent
5d4ec59a33
commit
e03e1aff0c
1 changed files with 11 additions and 1 deletions
|
|
@ -1,5 +1,7 @@
|
|||
/// \brief Battle mode power-up code
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "k_kart.h"
|
||||
#include "k_objects.h"
|
||||
#include "k_powerup.h"
|
||||
|
|
@ -95,7 +97,15 @@ void K_DropPowerUps(player_t* player)
|
|||
|
||||
auto& powerup = player->powerup;
|
||||
|
||||
drop(POWERUP_SMONITOR, [&] { powerup.superTimer = 0; });
|
||||
drop(
|
||||
POWERUP_SMONITOR, [&]
|
||||
{
|
||||
// P_CheckInvincibilityTimer needs 1 tic to end the music
|
||||
player->invincibilitytimer -= std::min(+powerup.superTimer, player->invincibilitytimer - 1);
|
||||
powerup.superTimer = 0;
|
||||
}
|
||||
);
|
||||
|
||||
drop(POWERUP_BARRIER, [&] { powerup.barrierTimer = 0; });
|
||||
drop(POWERUP_BADGE, [&] { powerup.rhythmBadgeTimer = 0; });
|
||||
drop(POWERUP_SUPERFLICKY, [&] { Obj_EndSuperFlickySwarm(powerup.flickyController); });
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue