From ca8aceb0593e1e8f4e2a7ae101809d630a33a74c Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 27 Aug 2018 17:25:22 +0100 Subject: [PATCH] Fix that thing where item boxes just wouldn't respawn in battle if you nabbed them all too quickly (which is very likely to happen in large netgames where we have the great fortune of playing on battal bowl). --- src/p_mobj.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 6b01f0a8..d7ef576d 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -9787,10 +9787,12 @@ void P_RespawnSpecials(void) // Transfer flags2 (strongbox, objectflip) newmobj->flags2 = box->flags2; P_RemoveMobj(box); // make sure they disappear - continue; + numgotboxes--; // you've restored a box, remove it from the count + //continue; -- irrelevant? } - numgotboxes = 0; + if (numgotboxes < 0) + numgotboxes = 0; } // only respawn items when cv_itemrespawn is on