mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-22 12:39:59 +00:00
Add maximum distance for teleporting followers on using a door
This commit is contained in:
parent
b108fbe986
commit
4d4f2fc475
@ -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…
x
Reference in New Issue
Block a user