mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- 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:
parent
0d9deb35aa
commit
917d698a87
2 changed files with 10 additions and 5 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue