diff --git a/src/g_shared/a_randomspawner.cpp b/src/g_shared/a_randomspawner.cpp index 4c1b5b964..5633c7b79 100644 --- a/src/g_shared/a_randomspawner.cpp +++ b/src/g_shared/a_randomspawner.cpp @@ -102,6 +102,7 @@ class ARandomSpawner : public AActor { AActor * newmobj = NULL; bool boss = false; + Super::PostBeginPlay(); if (Species == NAME_None) { Destroy(); return; } const PClass * cls = PClass::FindClass(Species); if (this->flags & MF_MISSILE && target && target->target) // Attempting to spawn a missile. diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 5a421b586..ddc304114 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -531,7 +531,7 @@ bool AActor::SetState (FState *newstate, bool nofunction) newstate = newstate->GetNextState(); } while (tics == 0); - if (screen != NULL) + if (Renderer != NULL) { Renderer->StateChanged(this); } @@ -3661,10 +3661,6 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t { level.total_secrets++; } - if (screen != NULL) - { - Renderer->StateChanged(actor); - } return actor; } @@ -3757,6 +3753,10 @@ void AActor::BeginPlay () void AActor::PostBeginPlay () { + if (Renderer != NULL) + { + Renderer->StateChanged(this); + } PrevAngle = angle; } diff --git a/src/p_user.cpp b/src/p_user.cpp index 28250f9dd..359a77349 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -532,6 +532,7 @@ void APlayerPawn::Tick() void APlayerPawn::PostBeginPlay() { + Super::PostBeginPlay(); SetupWeaponSlots(); // Voodoo dolls: restore original floorz/ceilingz logic diff --git a/src/s_advsound.cpp b/src/s_advsound.cpp index 58102ce4c..a381e91cd 100644 --- a/src/s_advsound.cpp +++ b/src/s_advsound.cpp @@ -2297,6 +2297,7 @@ void AMusicChanger::PostBeginPlay() { // The music changer should consider itself activated if the player // spawns in its sector as well as if it enters the sector during a P_TryMove. + Super::PostBeginPlay(); if (players[consoleplayer].mo && players[consoleplayer].mo->Sector == this->Sector) { TriggerAction(players[consoleplayer].mo, SECSPAC_Enter);