mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Battle: spawn 3 monitors at most
This commit is contained in:
parent
6f2befabc9
commit
9f3bee528a
2 changed files with 8 additions and 1 deletions
|
|
@ -435,6 +435,7 @@ void K_RunPaperItemSpawners(void)
|
|||
mobj_t *spotList[MAXITEM];
|
||||
UINT8 spotMap[MAXITEM];
|
||||
UINT8 spotCount = 0, spotBackup = 0, spotAvailable = 0;
|
||||
UINT8 monitorsSpawned = 0;
|
||||
|
||||
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||
{
|
||||
|
|
@ -458,6 +459,10 @@ void K_RunPaperItemSpawners(void)
|
|||
spotMap[spotAvailable] = spotCount;
|
||||
spotAvailable++;
|
||||
}
|
||||
else
|
||||
{
|
||||
monitorsSpawned++;
|
||||
}
|
||||
|
||||
spotList[spotCount] = mo;
|
||||
spotCount++;
|
||||
|
|
@ -484,7 +489,7 @@ void K_RunPaperItemSpawners(void)
|
|||
|
||||
//CONS_Printf("leveltime = %d ", leveltime);
|
||||
|
||||
if (spotAvailable > 0)
|
||||
if (spotAvailable > 0 && monitorsSpawned < BATTLE_MONITOR_SPAWN_LIMIT)
|
||||
{
|
||||
const UINT8 r = spotMap[P_RandomKey(PR_ITEM_ROULETTE, spotAvailable)];
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ extern "C" {
|
|||
#define BATTLE_DESPAWN_TIME (15*TICRATE)
|
||||
#define BATTLE_POWERUP_TIME (20*TICRATE)
|
||||
|
||||
#define BATTLE_MONITOR_SPAWN_LIMIT (3)
|
||||
|
||||
extern struct battleovertime
|
||||
{
|
||||
UINT16 enabled; ///< Has this been initalized yet?
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue