- call P_PlayerStartStomp only when the map is played directly from the loaded data and only when it has been fully loaded.

The old code did this right in the middle of map initialization where not everything had been set up yet.

(cherry picked from commit 7c527de374)
This commit is contained in:
Christoph Oelckers 2018-07-15 10:57:10 +02:00 committed by drfrag666
parent 0d9deb35aa
commit 917d698a87
2 changed files with 10 additions and 5 deletions

View file

@ -1034,6 +1034,16 @@ void G_DoLoadLevel (int position, bool autosave)
G_UnSnapshotLevel (!savegamerestore); // [RH] Restore the state of the level.
int pnumerr = G_FinishTravel ();
if (!level.FromSnapshot)
{
for (int i = 0; i<MAXPLAYERS; i++)
{
if (playeringame[i] && players[i].mo != NULL)
P_PlayerStartStomp(players[i].mo);
}
}
// For each player, if they are viewing through a player, make sure it is themselves.
for (int ii = 0; ii < MAXPLAYERS; ++ii)
{

View file

@ -1849,11 +1849,6 @@ void P_SpawnThings (int position)
SetMapThingUserData(actor, *udi);
}
}
for(int i=0; i<MAXPLAYERS; i++)
{
if (playeringame[i] && players[i].mo != NULL)
P_PlayerStartStomp(players[i].mo);
}
}