mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-09 18:31:53 +00:00
Battle: count emeralds inside of monitors during Overtime too
Don't spawn extra emeralds during Overtime since some monitors could survive.
This commit is contained in:
parent
700331fdd6
commit
5cebe7ab35
1 changed files with 17 additions and 13 deletions
|
|
@ -312,6 +312,21 @@ static inline boolean IsOnInterval(tic_t interval)
|
||||||
return ((leveltime - starttime) % interval) == 0;
|
return ((leveltime - starttime) % interval) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static UINT32 CountEmeraldsSpawned(const mobj_t *mo)
|
||||||
|
{
|
||||||
|
switch (mo->type)
|
||||||
|
{
|
||||||
|
case MT_EMERALD:
|
||||||
|
return mo->extravalue1;
|
||||||
|
|
||||||
|
case MT_MONITOR:
|
||||||
|
return Obj_MonitorGetEmerald(mo);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return 0U;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void K_RunPaperItemSpawners(void)
|
void K_RunPaperItemSpawners(void)
|
||||||
{
|
{
|
||||||
const boolean overtime = (battleovertime.enabled >= 10*TICRATE);
|
const boolean overtime = (battleovertime.enabled >= 10*TICRATE);
|
||||||
|
|
@ -375,10 +390,7 @@ void K_RunPaperItemSpawners(void)
|
||||||
|
|
||||||
mo = (mobj_t *)th;
|
mo = (mobj_t *)th;
|
||||||
|
|
||||||
if (mo->type == MT_EMERALD)
|
emeraldsSpawned |= CountEmeraldsSpawned(mo);
|
||||||
{
|
|
||||||
emeraldsSpawned |= mo->extravalue1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canmakeemeralds)
|
if (canmakeemeralds)
|
||||||
|
|
@ -437,15 +449,7 @@ void K_RunPaperItemSpawners(void)
|
||||||
|
|
||||||
mo = (mobj_t *)th;
|
mo = (mobj_t *)th;
|
||||||
|
|
||||||
if (mo->type == MT_EMERALD)
|
emeraldsSpawned |= CountEmeraldsSpawned(mo);
|
||||||
{
|
|
||||||
emeraldsSpawned |= mo->extravalue1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mo->type == MT_MONITOR)
|
|
||||||
{
|
|
||||||
emeraldsSpawned |= Obj_MonitorGetEmerald(mo);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mo->type != MT_PAPERITEMSPOT)
|
if (mo->type != MT_PAPERITEMSPOT)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue