1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-19 18:09:50 +00:00

Don't treat actors as following if another non-combat AiPackage precedes (Fixes #1843)

This commit is contained in:
scrawl 2014-08-24 22:39:46 +02:00
parent 7714192e28
commit 854491ac15

View file

@ -1402,6 +1402,7 @@ namespace MWMechanics
if (stats.isDead())
continue;
// An actor counts as following if AiFollow is the current AiPackage, or there are only Combat packages before the AiFollow package
for (std::list<MWMechanics::AiPackage*>::const_iterator it = stats.getAiSequence().begin(); it != stats.getAiSequence().end(); ++it)
{
if ((*it)->getTypeId() == MWMechanics::AiPackage::TypeIdFollow)
@ -1412,6 +1413,8 @@ namespace MWMechanics
if (followTarget == actor)
list.push_back(iter->first);
}
else if ((*it)->getTypeId() != MWMechanics::AiPackage::TypeIdCombat)
break;
}
}
return list;