mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-05 21:45:33 +00:00
An actor needs not be in active cell. As such we can't use
PhysicsSystem::getActor() to determine that a ptr is not actor.
This commit is contained in:
parent
50db75bd13
commit
36bb2d5f15
1 changed files with 1 additions and 2 deletions
|
@ -1258,10 +1258,9 @@ namespace MWWorld
|
||||||
auto* actor = mPhysics->getActor(ptr);
|
auto* actor = mPhysics->getActor(ptr);
|
||||||
osg::Vec3f newpos = ptr.getRefData().getPosition().asVec3() + vec;
|
osg::Vec3f newpos = ptr.getRefData().getPosition().asVec3() + vec;
|
||||||
if (actor)
|
if (actor)
|
||||||
{
|
|
||||||
actor->adjustPosition(vec);
|
actor->adjustPosition(vec);
|
||||||
|
if (ptr.getClass().isActor())
|
||||||
return moveObject(ptr, newpos.x(), newpos.y(), newpos.z(), false, moveToActive && ptr != getPlayerPtr());
|
return moveObject(ptr, newpos.x(), newpos.y(), newpos.z(), false, moveToActive && ptr != getPlayerPtr());
|
||||||
}
|
|
||||||
return moveObject(ptr, newpos.x(), newpos.y(), newpos.z());
|
return moveObject(ptr, newpos.x(), newpos.y(), newpos.z());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue