From e75c052e7b6224af2eaf6f193e99ee25939cc6bc Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Tue, 27 Jun 2023 02:20:20 -0700 Subject: [PATCH] Force MT_RANDOMITEM to start S_RANDOMITEM in Prisons --- src/objects/random-item.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/objects/random-item.c b/src/objects/random-item.c index 7c19a4228..f392d9752 100644 --- a/src/objects/random-item.c +++ b/src/objects/random-item.c @@ -172,6 +172,14 @@ void Obj_RandomItemSpawn(mobj_t *mobj) { item_vfxtimer(mobj) = P_RandomRange(PR_DECORATION, 0, SCALE_TIME - 1); + // Respawns are handled by P_RespawnBattleBoxes, + // but we do need to start MT_RANDOMITEMs in the right state... + if (mobj->type == MT_RANDOMITEM && (gametyperules & GTR_BUMPERS)) + { + mobj->extravalue1 = RINGBOX_TIME; + P_SetMobjState(mobj, S_RANDOMITEM1); + } + mobj->destscale = Obj_RandomItemScale(mobj->destscale); P_SetScale(mobj, mobj->destscale); }