- give thinkers a 'level' member and change linking to the chain to happen outside the constructor.

This commit is contained in:
Christoph Oelckers 2019-01-27 01:49:20 +01:00
commit 8323524014
43 changed files with 201 additions and 228 deletions

View file

@ -293,14 +293,14 @@ void DPusher::Tick ()
}
void AdjustPusher(int tag, int magnitude, int angle, bool wind)
void FLevelLocals::AdjustPusher(int tag, int magnitude, int angle, bool wind)
{
DPusher::EPusher type = wind ? DPusher::p_wind : DPusher::p_current;
// Find pushers already attached to the sector, and change their parameters.
TArray<FThinkerCollection> Collection;
{
TThinkerIterator<DPusher> iterator;
auto iterator = GetThinkerIterator<DPusher>();
FThinkerCollection collect;
while ((collect.Obj = iterator.Next()))
@ -328,7 +328,7 @@ void AdjustPusher(int tag, int magnitude, int angle, bool wind)
}
if (i == numcollected)
{
Create<DPusher>(type, nullptr, magnitude, angle, nullptr, secnum);
CreateThinker<DPusher>(type, nullptr, magnitude, angle, nullptr, secnum);
}
}
}