mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 08:15:54 +00:00
Make search for followers in getEnemiesNearby recursive
This commit is contained in:
parent
75bd6e1d28
commit
53599290c3
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <typeinfo>
|
||||
#include <iostream>
|
||||
|
||||
#include <components/esm/esmreader.hpp>
|
||||
#include <components/esm/esmwriter.hpp>
|
||||
#include <components/esm/loadnpc.hpp>
|
||||
|
@ -1927,7 +1926,8 @@ namespace MWMechanics
|
|||
osg::Vec3f position (actor.getRefData().getPosition().asVec3());
|
||||
getObjectsInRange(position, aiProcessingDistance, neighbors);
|
||||
|
||||
std::list<MWWorld::Ptr> followers = getActorsFollowing(actor);
|
||||
std::set<MWWorld::Ptr> followers;
|
||||
getActorsFollowing(actor, followers);
|
||||
for(auto neighbor = neighbors.begin(); neighbor != neighbors.end(); ++neighbor)
|
||||
{
|
||||
const CreatureStats &stats = neighbor->getClass().getCreatureStats(*neighbor);
|
||||
|
|
Loading…
Reference in a new issue