Fix battlemode item boxes not respawning (closes #135)

This commit is contained in:
NepDisk 2025-10-02 15:46:58 -04:00
parent 15aded75f9
commit 5834d6ea5a
3 changed files with 3 additions and 2 deletions

View file

@ -572,7 +572,6 @@ void K_RespawnBattleBoxes(void)
newmobj->flags2 = box->flags2;
P_RemoveMobj(box); // make sure they disappear
numgotboxes--; // you've restored a box, remove it from the count
//continue; -- irrelevant?
}
if (numgotboxes < 0)

View file

@ -13686,7 +13686,6 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
case MT_RANDOMITEM:
{
mobj->flags2 |= MF2_BOSSNOTRAP; // mark as here on map start
nummapboxes++;
break;
}
case MT_ITEMCAPSULE:

View file

@ -782,6 +782,9 @@ static void P_SpawnMapThings(boolean spawnemblems)
if (!spawnemblems && mt->type == mobjinfo[MT_EMBLEM].doomednum)
continue;
if (mt->type == mobjinfo[MT_RANDOMITEM].doomednum)
nummapboxes++;
// Don't spawn non-patch objects of this type if they are uneeded
if (mt->patch == false && basemaptyperemoval[mt->type] == true)
continue;