This commit is contained in:
Rachael Alexanderson 2016-12-26 15:46:17 -05:00
commit 7ea4c9508f
21 changed files with 174 additions and 137 deletions

View file

@ -1196,8 +1196,7 @@ void G_StartTravel ()
// Only living players travel. Dead ones get a new body on the new level.
if (players[i].health > 0)
{
pawn->UnlinkFromWorld ();
P_DelSector_List ();
pawn->UnlinkFromWorld (nullptr);
int tid = pawn->tid; // Save TID
pawn->RemoveFromHash ();
pawn->tid = tid; // Restore TID (but no longer linked into the hash chain)
@ -1206,8 +1205,7 @@ void G_StartTravel ()
for (inv = pawn->Inventory; inv != NULL; inv = inv->Inventory)
{
inv->ChangeStatNum (STAT_TRAVELLING);
inv->UnlinkFromWorld ();
P_DelSector_List ();
inv->UnlinkFromWorld (nullptr);
}
}
}
@ -1304,7 +1302,7 @@ void G_FinishTravel ()
{
pawndup->Destroy();
}
pawn->LinkToWorld ();
pawn->LinkToWorld (nullptr);
pawn->ClearInterpolation();
pawn->AddToHash ();
pawn->SetState(pawn->SpawnState);
@ -1313,7 +1311,7 @@ void G_FinishTravel ()
for (inv = pawn->Inventory; inv != NULL; inv = inv->Inventory)
{
inv->ChangeStatNum (STAT_INVENTORY);
inv->LinkToWorld ();
inv->LinkToWorld (nullptr);
inv->Travelled ();
}
if (ib_compatflags & BCOMPATF_RESETPLAYERSPEED)