- 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.


SVN r1406 (trunk)
This commit is contained in:
Randy Heit 2009-02-06 04:43:51 +00:00
parent cccdfd6336
commit 64b783f4bd
3 changed files with 9 additions and 2 deletions

View file

@ -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.

View file

@ -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;
}

View file

@ -3735,7 +3735,6 @@ APlayerPawn *P_SpawnPlayer (FMapThing *mthing, bool tempplayer)
mobj->z = mobj->ceilingz - mobj->height;
}
// [BC] Do script stuff
if (!tempplayer)
{