Fixed PlayerEntered for non-travel enters

This commit is contained in:
ZZYZX 2017-02-02 22:21:54 +02:00
parent 7f2d97d7ef
commit 5d8b3e8084

View file

@ -5426,6 +5426,9 @@ APlayerPawn *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags)
{ {
if (state == PST_ENTER || (state == PST_LIVE && !savegamerestore)) 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(p - players, false);
FBehavior::StaticStartTypedScripts (SCRIPT_Enter, p->mo, true); FBehavior::StaticStartTypedScripts (SCRIPT_Enter, p->mo, true);
} }
else if (state == PST_REBORN) else if (state == PST_REBORN)