- scriptified A_KeenDie.

- added an 'exact' parameter to FThinkerIterator's Next function. This is mainly for scripting which allows to do a lot more checks natively when running the iterator while looking for one specific class.
This commit is contained in:
Christoph Oelckers 2016-11-05 01:19:41 +01:00
commit 010fd038be
10 changed files with 59 additions and 55 deletions

View file

@ -480,7 +480,7 @@ void FThinkerIterator::Reinit ()
m_SearchingFresh = false;
}
DThinker *FThinkerIterator::Next ()
DThinker *FThinkerIterator::Next (bool exact)
{
if (m_ParentType == NULL)
{
@ -496,7 +496,11 @@ DThinker *FThinkerIterator::Next ()
{
DThinker *thinker = m_CurrThinker;
m_CurrThinker = thinker->NextThinker;
if (thinker->IsKindOf(m_ParentType))
if (exact)
{
if (thinker->IsA(m_ParentType)) return thinker;
}
else if (thinker->IsKindOf(m_ParentType))
{
return thinker;
}