mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-11 00:44:33 +00:00
Fix freeze in getActorsSidingWith
This commit is contained in:
parent
b748bb11ae
commit
b77d733c3e
@ -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…
x
Reference in New Issue
Block a user