- Fixed: When revisiting a map in a hub, the player could spawn at the wrong

height if the floor had moved while they were there before. This was because
  the player was spawned on the original copy of the map before the changes to
  it were dearchived, so they didn't know about the new floor height.
- Fixed: Calling BaseFileSearch() and letting it fill in the file's extension
  didn't work because the space for the path was deallocated before it
  returned.
- Guess we're not leak-free yet. Try travelling around in a hub and see that
  it leaks. I don't have time to track it down right now.


SVN r107 (trunk)
This commit is contained in:
Randy Heit 2006-05-11 05:00:35 +00:00
commit b8e61376c3
5 changed files with 19 additions and 4 deletions

View file

@ -1960,7 +1960,7 @@ void G_StartTravel ()
void G_FinishTravel ()
{
TThinkerIterator<APlayerPawn> it (STAT_TRAVELLING);
APlayerPawn *pawn, *pawndup, *next;
APlayerPawn *pawn, *pawndup, *oldpawn, *next;
AInventory *inv;
next = it.Next ();
@ -1977,6 +1977,9 @@ void G_FinishTravel ()
}
else
{
oldpawn = pawndup;
P_SpawnPlayer (&playerstarts[pawn->player - players]);
pawndup = pawn->player->mo;
if (!startkeepfacing)
{
pawn->angle = pawndup->angle;
@ -2002,7 +2005,8 @@ void G_FinishTravel ()
pawn->lastenemy = NULL;
pawn->AddToHash ();
pawn->player->mo = pawn;
DObject::PointerSubstitution (pawndup, pawn);
DObject::PointerSubstitution (oldpawn, pawn);
oldpawn->Destroy();
pawndup->Destroy ();
pawn->LinkToWorld ();
pawn->AddToHash ();