mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- moved the FRenderer::StateChanged call from AActor::StaticSpawn to AActor::PostBeginPlay.
- ensured that all classes reach AActor's PostBeginPlay method. Some were missing a Super call. SVN r3404 (trunk)
This commit is contained in:
parent
f2f9bd800d
commit
d3981197c5
4 changed files with 8 additions and 5 deletions
|
@ -102,6 +102,7 @@ class ARandomSpawner : public AActor
|
||||||
{
|
{
|
||||||
AActor * newmobj = NULL;
|
AActor * newmobj = NULL;
|
||||||
bool boss = false;
|
bool boss = false;
|
||||||
|
Super::PostBeginPlay();
|
||||||
if (Species == NAME_None) { Destroy(); return; }
|
if (Species == NAME_None) { Destroy(); return; }
|
||||||
const PClass * cls = PClass::FindClass(Species);
|
const PClass * cls = PClass::FindClass(Species);
|
||||||
if (this->flags & MF_MISSILE && target && target->target) // Attempting to spawn a missile.
|
if (this->flags & MF_MISSILE && target && target->target) // Attempting to spawn a missile.
|
||||||
|
|
|
@ -531,7 +531,7 @@ bool AActor::SetState (FState *newstate, bool nofunction)
|
||||||
newstate = newstate->GetNextState();
|
newstate = newstate->GetNextState();
|
||||||
} while (tics == 0);
|
} while (tics == 0);
|
||||||
|
|
||||||
if (screen != NULL)
|
if (Renderer != NULL)
|
||||||
{
|
{
|
||||||
Renderer->StateChanged(this);
|
Renderer->StateChanged(this);
|
||||||
}
|
}
|
||||||
|
@ -3661,10 +3661,6 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t
|
||||||
{
|
{
|
||||||
level.total_secrets++;
|
level.total_secrets++;
|
||||||
}
|
}
|
||||||
if (screen != NULL)
|
|
||||||
{
|
|
||||||
Renderer->StateChanged(actor);
|
|
||||||
}
|
|
||||||
return actor;
|
return actor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3757,6 +3753,10 @@ void AActor::BeginPlay ()
|
||||||
|
|
||||||
void AActor::PostBeginPlay ()
|
void AActor::PostBeginPlay ()
|
||||||
{
|
{
|
||||||
|
if (Renderer != NULL)
|
||||||
|
{
|
||||||
|
Renderer->StateChanged(this);
|
||||||
|
}
|
||||||
PrevAngle = angle;
|
PrevAngle = angle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -532,6 +532,7 @@ void APlayerPawn::Tick()
|
||||||
|
|
||||||
void APlayerPawn::PostBeginPlay()
|
void APlayerPawn::PostBeginPlay()
|
||||||
{
|
{
|
||||||
|
Super::PostBeginPlay();
|
||||||
SetupWeaponSlots();
|
SetupWeaponSlots();
|
||||||
|
|
||||||
// Voodoo dolls: restore original floorz/ceilingz logic
|
// Voodoo dolls: restore original floorz/ceilingz logic
|
||||||
|
|
|
@ -2297,6 +2297,7 @@ void AMusicChanger::PostBeginPlay()
|
||||||
{
|
{
|
||||||
// The music changer should consider itself activated if the player
|
// 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.
|
// 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)
|
if (players[consoleplayer].mo && players[consoleplayer].mo->Sector == this->Sector)
|
||||||
{
|
{
|
||||||
TriggerAction(players[consoleplayer].mo, SECSPAC_Enter);
|
TriggerAction(players[consoleplayer].mo, SECSPAC_Enter);
|
||||||
|
|
Loading…
Reference in a new issue