- 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
parent a0c88a9b31
commit b8e61376c3
5 changed files with 19 additions and 4 deletions

View file

@ -1,4 +1,13 @@
May 10, 2006
- 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.
- 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.
- 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.
- Yay! We now seem to be free of memory leaks! The next step will be to
merge a lot of these static destructor-only structs into regular
functions added to the exit chain with atterm so that they can be called

View file

@ -1710,7 +1710,8 @@ static const char *BaseFileSearch (const char *file, const char *ext, bool lookf
if (FileExists (file))
{
return file;
sprintf (wad, "%s", file);
return wad;
}
if (GameConfig->SetSection ("FileSearch.Directories"))

View file

@ -1172,7 +1172,6 @@ void G_PlayerReborn (int player)
// at the given mapthing2_t spot
// because something is occupying it
//
void P_SpawnPlayer (mapthing2_t* mthing);
BOOL G_CheckSpot (int playernum, mapthing2_t *mthing)
{

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 ();

View file

@ -92,6 +92,8 @@ void P_UnPredictPlayer ();
extern fixed_t FloatBobOffsets[64];
extern AActor *MissileActor;
void P_SpawnPlayer (mapthing2_t* mthing);
void P_ThrustMobj (AActor *mo, angle_t angle, fixed_t move);
int P_FaceMobj (AActor *source, AActor *target, angle_t *delta);
bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax);