mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -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())
|
if (stats.isDead())
|
||||||
continue;
|
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)
|
for (std::list<MWMechanics::AiPackage*>::const_iterator it = stats.getAiSequence().begin(); it != stats.getAiSequence().end(); ++it)
|
||||||
{
|
{
|
||||||
if ((*it)->getTypeId() == MWMechanics::AiPackage::TypeIdFollow)
|
if ((*it)->getTypeId() == MWMechanics::AiPackage::TypeIdFollow)
|
||||||
@ -1412,6 +1413,8 @@ namespace MWMechanics
|
|||||||
if (followTarget == actor)
|
if (followTarget == actor)
|
||||||
list.push_back(iter->first);
|
list.push_back(iter->first);
|
||||||
}
|
}
|
||||||
|
else if ((*it)->getTypeId() != MWMechanics::AiPackage::TypeIdCombat)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user