mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Halve spawn time for Battle items
This commit is contained in:
parent
3965f77763
commit
71004d4b46
2 changed files with 9 additions and 10 deletions
|
|
@ -347,10 +347,15 @@ UINT8 K_NumEmeralds(player_t *player)
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline boolean IsOnInterval(tic_t interval)
|
||||||
|
{
|
||||||
|
return ((leveltime - starttime) % interval) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
void K_RunPaperItemSpawners(void)
|
void K_RunPaperItemSpawners(void)
|
||||||
{
|
{
|
||||||
const boolean overtime = (battleovertime.enabled >= 10*TICRATE);
|
const boolean overtime = (battleovertime.enabled >= 10*TICRATE);
|
||||||
tic_t interval = BATTLE_SPAWN_INTERVAL;
|
const tic_t interval = BATTLE_SPAWN_INTERVAL;
|
||||||
|
|
||||||
const boolean canmakeemeralds = true; //(!(battlecapsules || bossinfo.boss));
|
const boolean canmakeemeralds = true; //(!(battlecapsules || bossinfo.boss));
|
||||||
|
|
||||||
|
|
@ -375,13 +380,7 @@ void K_RunPaperItemSpawners(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (overtime == true)
|
if (!IsOnInterval(interval))
|
||||||
{
|
|
||||||
// Double frequency of items
|
|
||||||
interval /= 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (((leveltime - starttime) % interval) != 0)
|
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -557,7 +556,7 @@ void K_RunPaperItemSpawners(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (gametyperules & GTR_SPHERES)
|
if ((gametyperules & GTR_SPHERES) && IsOnInterval(2 * interval))
|
||||||
{
|
{
|
||||||
drop = K_SpawnSphereBox(
|
drop = K_SpawnSphereBox(
|
||||||
spotList[r]->x, spotList[r]->y, spotList[r]->z + (128 * mapobjectscale * flip),
|
spotList[r]->x, spotList[r]->y, spotList[r]->z + (128 * mapobjectscale * flip),
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define BATTLE_SPAWN_INTERVAL (8*TICRATE)
|
#define BATTLE_SPAWN_INTERVAL (4*TICRATE)
|
||||||
|
|
||||||
extern struct battleovertime
|
extern struct battleovertime
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue