mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Power-ups: dropped power-ups always have at least 15 seconds
This commit is contained in:
parent
54240ac96b
commit
6993f12dff
2 changed files with 3 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ extern "C" {
|
||||||
#define BATTLE_SPAWN_INTERVAL (4*TICRATE)
|
#define BATTLE_SPAWN_INTERVAL (4*TICRATE)
|
||||||
#define BATTLE_DESPAWN_TIME (15*TICRATE)
|
#define BATTLE_DESPAWN_TIME (15*TICRATE)
|
||||||
#define BATTLE_POWERUP_TIME (30*TICRATE)
|
#define BATTLE_POWERUP_TIME (30*TICRATE)
|
||||||
|
#define BATTLE_POWERUP_DROPPED_TIME (15*TICRATE)
|
||||||
#define BATTLE_UFO_TIME (20*TICRATE)
|
#define BATTLE_UFO_TIME (20*TICRATE)
|
||||||
|
|
||||||
extern struct battleovertime
|
extern struct battleovertime
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include "k_battle.h"
|
||||||
#include "k_kart.h"
|
#include "k_kart.h"
|
||||||
#include "k_objects.h"
|
#include "k_objects.h"
|
||||||
#include "k_powerup.h"
|
#include "k_powerup.h"
|
||||||
|
|
@ -127,7 +128,7 @@ void K_DropPowerUps(player_t* player)
|
||||||
|
|
||||||
if (remaining)
|
if (remaining)
|
||||||
{
|
{
|
||||||
K_DropPaperItem(player, powerup, remaining);
|
K_DropPaperItem(player, powerup, std::max<tic_t>(remaining, BATTLE_POWERUP_DROPPED_TIME));
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue