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:
parent
7714192e28
commit
854491ac15
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue