- give thinkers a 'level' member and change linking to the chain to happen outside the constructor.
This commit is contained in:
parent
df4c7d8f56
commit
8323524014
43 changed files with 201 additions and 228 deletions
|
|
@ -42,7 +42,6 @@ static FRandom pr_lightning ("Lightning");
|
|||
IMPLEMENT_CLASS(DLightningThinker, false, false)
|
||||
|
||||
DLightningThinker::DLightningThinker ()
|
||||
: DThinker (STAT_LIGHTNING)
|
||||
{
|
||||
Stopped = false;
|
||||
LightningFlashCount = 0;
|
||||
|
|
@ -232,20 +231,20 @@ void P_StartLightning ()
|
|||
}
|
||||
|
||||
DLightningThinker *lightning = LocateLightning ();
|
||||
if (lightning == NULL)
|
||||
if (lightning == nullptr)
|
||||
{
|
||||
Create<DLightningThinker>();
|
||||
level.CreateThinker<DLightningThinker>();
|
||||
}
|
||||
}
|
||||
|
||||
void P_ForceLightning (int mode)
|
||||
{
|
||||
DLightningThinker *lightning = LocateLightning ();
|
||||
if (lightning == NULL)
|
||||
if (lightning == nullptr)
|
||||
{
|
||||
lightning = Create<DLightningThinker>();
|
||||
lightning = level.CreateThinker<DLightningThinker>();
|
||||
}
|
||||
if (lightning != NULL)
|
||||
if (lightning != nullptr)
|
||||
{
|
||||
lightning->ForceLightning (mode);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue