- handled approx. half of all cases where the address of level is taken.

This commit is contained in:
Christoph Oelckers 2019-01-28 00:55:21 +01:00
commit 648e472744
38 changed files with 122 additions and 128 deletions

View file

@ -85,7 +85,7 @@ protected:
static bool P_StartButton (side_t *side, int Where, FSwitchDef *Switch, const DVector2 &pos, bool useagain)
{
DActiveButton *button;
TThinkerIterator<DActiveButton> iterator;
auto iterator = side->GetLevel()->GetThinkerIterator<DActiveButton>();
// See if button is already pressed
while ( (button = iterator.Next ()) )
@ -97,7 +97,7 @@ static bool P_StartButton (side_t *side, int Where, FSwitchDef *Switch, const DV
}
}
side->sector->Level->CreateThinker<DActiveButton> (side, Where, Switch, pos, useagain);
side->GetLevel()->CreateThinker<DActiveButton> (side, Where, Switch, pos, useagain);
return true;
}