- The complete FMapThing is overkill for storing player starts, so use a new minimal structure for them.

SVN r3750 (trunk)
This commit is contained in:
Randy Heit 2012-07-08 02:18:15 +00:00
commit 0c8e4c37d9
8 changed files with 40 additions and 27 deletions

View file

@ -4074,7 +4074,7 @@ EXTERN_CVAR (Bool, chasedemo)
extern bool demonew;
APlayerPawn *P_SpawnPlayer (FMapThing *mthing, int playernum, bool tempplayer)
APlayerPawn *P_SpawnPlayer (FPlayerStart *mthing, int playernum, bool tempplayer)
{
player_t *p;
APlayerPawn *mobj, *oldactor;
@ -4356,7 +4356,8 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
// count deathmatch start positions
if (mthing->type == 11)
{
deathmatchstarts.Push (*mthing);
FPlayerStart start(mthing);
deathmatchstarts.Push(start);
return NULL;
}
@ -4480,11 +4481,12 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
return NULL;
// save spots for respawning in network games
playerstarts[pnum] = *mthing;
AllPlayerStarts.Push(*mthing);
FPlayerStart start(mthing);
playerstarts[pnum] = start;
AllPlayerStarts.Push(start);
if (!deathmatch && !(level.flags2 & LEVEL2_RANDOMPLAYERSTARTS))
{
return P_SpawnPlayer(&playerstarts[pnum], pnum);
return P_SpawnPlayer(&start, pnum);
}
return NULL;
}