- Moved thingdef_codeptr.cpp into thingdef/ with the other thingdef files.

- Fixed: After loading a savegame, G_UnSnapshotLevel() destroyed the
  unmorphed versions of players because it thought they were extras.


SVN r694 (trunk)
This commit is contained in:
Randy Heit 2008-01-12 01:17:37 +00:00
commit ce388163e1
5 changed files with 20 additions and 2 deletions

View file

@ -2813,7 +2813,20 @@ void G_UnSnapshotLevel (bool hubLoad)
next = it.Next();
if (pawn->player == NULL || pawn->player->mo == NULL || !playeringame[pawn->player - players])
{
pawn->Destroy ();
int i;
// If this isn't the unmorphed original copy of a player, destroy it, because it's extra.
for (i = 0; i < MAXPLAYERS; ++i)
{
if (playeringame[i] && players[i].morphTics && players[i].mo->tracer == pawn)
{
break;
}
}
if (i == MAXPLAYERS)
{
pawn->Destroy ();
}
}
}
}