diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 1f8051527..bb9ae4a19 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,9 @@ +February 5, 2009 +- Changed singleplayer allowrespawn to act like a co-op game when you + change levels while dead by immediately respawning you before the switch + so that you get to keep all your inventory. +- Fixed: G_InitLevelLocals() did not set flags2. + February 5, 2009 (Changes by Graf Zahl) - fixed: The compatibility parser applied the last map's settings to all maps in the compatibility list. diff --git a/src/g_level.cpp b/src/g_level.cpp index a2859ad75..448d1658c 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -605,7 +605,7 @@ void G_ChangeLevel(const char *levelname, int position, bool keepFacing, int nex // If this is co-op, respawn any dead players now so they can // keep their inventory on the next map. - if (multiplayer && !deathmatch && player->playerstate == PST_DEAD) + if ((multiplayer || level.flags2 & LEVEL2_ALLOWRESPAWN) && !deathmatch && player->playerstate == PST_DEAD) { // Copied from the end of P_DeathThink [[ player->cls = NULL; // Force a new class if the player is using a random class @@ -1270,6 +1270,7 @@ void G_InitLevelLocals () level.cluster = info->cluster; level.clusterflags = clus ? clus->flags : 0; level.flags |= info->flags; + level.flags2 |= info->flags2; level.levelnum = info->levelnum; level.Music = info->Music; level.musicorder = info->musicorder; @@ -1296,6 +1297,7 @@ void G_InitLevelLocals () strcpy (level.skypic1, "SKY1"); strcpy (level.skypic2, "SKY1"); level.flags = 0; + level.flags2 = 0; level.levelnum = 1; } diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index ae666c96a..55dfc9533 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -3735,7 +3735,6 @@ APlayerPawn *P_SpawnPlayer (FMapThing *mthing, bool tempplayer) mobj->z = mobj->ceilingz - mobj->height; } - // [BC] Do script stuff if (!tempplayer) {