- 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:
Christoph Oelckers 2012-03-07 01:03:56 +00:00
commit d3981197c5
4 changed files with 8 additions and 5 deletions

View file

@ -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;
}