mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
Don't treat actors as following if another non-combat AiPackage precedes (Fixes #1843)
This commit is contained in:
parent
7714192e28
commit
854491ac15
@ -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…
x
Reference in New Issue
Block a user