Power-ups: dropped power-ups always have at least 15 seconds

This commit is contained in:
James R 2024-03-07 00:40:24 -08:00
parent 54240ac96b
commit 6993f12dff
2 changed files with 3 additions and 1 deletions

View file

@ -11,6 +11,7 @@ extern "C" {
#define BATTLE_SPAWN_INTERVAL (4*TICRATE)
#define BATTLE_DESPAWN_TIME (15*TICRATE)
#define BATTLE_POWERUP_TIME (30*TICRATE)
#define BATTLE_POWERUP_DROPPED_TIME (15*TICRATE)
#define BATTLE_UFO_TIME (20*TICRATE)
extern struct battleovertime

View file

@ -2,6 +2,7 @@
#include <algorithm>
#include "k_battle.h"
#include "k_kart.h"
#include "k_objects.h"
#include "k_powerup.h"
@ -127,7 +128,7 @@ void K_DropPowerUps(player_t* player)
if (remaining)
{
K_DropPaperItem(player, powerup, remaining);
K_DropPaperItem(player, powerup, std::max<tic_t>(remaining, BATTLE_POWERUP_DROPPED_TIME));
callback();
}
};