- fixed handling of PlayerEntered event.

This was done in P_SpawnPlayer where it would be called not only on voodoo dolls but also on temporary player pawns. The second case was attempted to avoid, but this would break intra-hub travels to unvisited levels.
Moved the handling to G_DoLoadLevel for all cases where we have a clear and unambiguous situation with all players being set up and no voodoo dolls that might trigger an event.
This commit is contained in:
Christoph Oelckers 2017-02-24 21:45:53 +01:00
parent 555f339924
commit 43c5fa93f9
2 changed files with 18 additions and 21 deletions

View file

@ -5511,9 +5511,6 @@ APlayerPawn *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags)
{
if (state == PST_ENTER || (state == PST_LIVE && !savegamerestore))
{
// [ZZ] fire non-hub ENTER event
// level.time is a hack to make sure that we don't call it on dummy player initialization during hub return.
if (!level.time) E_PlayerEntered(int(p - players), false);
FBehavior::StaticStartTypedScripts (SCRIPT_Enter, p->mo, true);
}
else if (state == PST_REBORN)