mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 22:45:33 +00:00
Fix freeze in getActorsSidingWith
This commit is contained in:
parent
b748bb11ae
commit
b77d733c3e
1 changed files with 3 additions and 4 deletions
|
@ -1790,14 +1790,13 @@ namespace MWMechanics
|
|||
// Actors that are targeted by this actor's Follow or Escort packages also side with them
|
||||
for (auto package = stats.getAiSequence().begin(); package != stats.getAiSequence().end(); ++package)
|
||||
{
|
||||
const MWWorld::Ptr &target = (*package)->getTarget();
|
||||
if ((*package)->sideWithTarget() && !target.isEmpty())
|
||||
if ((*package)->sideWithTarget() && !(*package)->getTarget().isEmpty())
|
||||
{
|
||||
if (iteratedActor == actor)
|
||||
{
|
||||
list.push_back(target);
|
||||
list.push_back((*package)->getTarget());
|
||||
}
|
||||
else if (target == actor)
|
||||
else if ((*package)->getTarget() == actor)
|
||||
{
|
||||
list.push_back(iteratedActor);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue