diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 3fb204aea..6a78d29bb 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3907,13 +3907,17 @@ void D_GameTypeChanged(INT32 lastgametype) // There will always be a server, and this only needs to be done once. if (server && (multiplayer || netgame)) { - if (gametype == GT_COMPETITION || gametype == GT_COOP) + if (gametype == GT_COMPETITION) CV_SetValue(&cv_itemrespawn, 0); - else if (!cv_itemrespawn.changed) + else if (!cv_itemrespawn.changed || lastgametype == GT_COMPETITION) CV_SetValue(&cv_itemrespawn, 1); switch (gametype) { + case GT_COOP: + if (!cv_itemrespawntime.changed) + CV_Set(&cv_itemrespawntime, cv_itemrespawntime.defaultvalue); // respawn normally + break; case GT_MATCH: case GT_TEAMMATCH: if (!cv_timelimit.changed && !cv_pointlimit.changed) // user hasn't changed limits diff --git a/src/p_inter.c b/src/p_inter.c index c65e6cc36..d6f7da48a 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2392,7 +2392,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget { P_SetTarget(&target->target, source); source->player->numboxes++; - if ((cv_itemrespawn.value && gametype != GT_COOP && (modifiedgame || netgame || multiplayer))) + if (cv_itemrespawn.value && (modifiedgame || netgame || multiplayer)) target->fuse = cv_itemrespawntime.value*TICRATE + 2; // Random box generation } diff --git a/src/p_mobj.c b/src/p_mobj.c index 498cf897e..32b261fb8 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -11011,7 +11011,6 @@ void P_RespawnSpecials(void) // only respawn items when cv_itemrespawn is on if (!(netgame || multiplayer) // Never respawn in single player - || gametype == GT_COOP // Never respawn in co-op gametype || !cv_itemrespawn.value) // cvar is turned off return;