From 5d8b3e80840995c2903a20feab9273bd6b0a1d5a Mon Sep 17 00:00:00 2001 From: ZZYZX Date: Thu, 2 Feb 2017 22:21:54 +0200 Subject: [PATCH] Fixed PlayerEntered for non-travel enters --- src/p_mobj.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index f22f63937..25cf35059 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -5426,6 +5426,9 @@ 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(p - players, false); FBehavior::StaticStartTypedScripts (SCRIPT_Enter, p->mo, true); } else if (state == PST_REBORN)