mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 17:15:35 +00:00
Disable AiPursue package for player's followers
This commit is contained in:
parent
eac2e52841
commit
72ce118d02
1 changed files with 12 additions and 0 deletions
|
@ -1152,7 +1152,19 @@ namespace MWMechanics
|
||||||
it->getClass().getNpcStats(*it).setCrimeId(id);
|
it->getClass().getNpcStats(*it).setCrimeId(id);
|
||||||
|
|
||||||
if (!it->getClass().getCreatureStats(*it).getAiSequence().hasPackage(AiPackage::TypeIdPursue))
|
if (!it->getClass().getCreatureStats(*it).getAiSequence().hasPackage(AiPackage::TypeIdPursue))
|
||||||
|
{
|
||||||
|
// Player's followers should not try to arrest player
|
||||||
|
if (it->getClass().getCreatureStats(*it).getAiSequence().hasPackage(AiPackage::TypeIdFollow))
|
||||||
|
{
|
||||||
|
std::set<MWWorld::Ptr> playerFollowers;
|
||||||
|
getActorsSidingWith(player, playerFollowers);
|
||||||
|
|
||||||
|
if (playerFollowers.find(*it) != playerFollowers.end())
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
it->getClass().getCreatureStats(*it).getAiSequence().stack(AiPursue(player), *it);
|
it->getClass().getCreatureStats(*it).getAiSequence().stack(AiPursue(player), *it);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue