forked from mirror/openmw-tes3mp
Add maximum distance for teleporting followers on using a door
This commit is contained in:
parent
b108fbe986
commit
4d4f2fc475
1 changed files with 5 additions and 1 deletions
|
@ -37,7 +37,11 @@ namespace MWWorld
|
|||
getFollowers(actor, followers);
|
||||
for(std::set<MWWorld::Ptr>::iterator it = followers.begin();it != followers.end();++it)
|
||||
{
|
||||
teleport(*it);
|
||||
MWWorld::Ptr follower = *it;
|
||||
if (Ogre::Vector3(follower.getRefData().getPosition().pos).squaredDistance(
|
||||
Ogre::Vector3( actor.getRefData().getPosition().pos))
|
||||
<= 800*800)
|
||||
teleport(*it);
|
||||
}
|
||||
|
||||
teleport(actor);
|
||||
|
|
Loading…
Reference in a new issue