Unconditionally call actor->resetPosition in adjustPosition.

Revert broken change that would force adjust all actors in cell upon
loading. That break floating corpses (and probably others things).
pull/3041/head
fredzio 4 years ago
parent daf6c9f88f
commit a314f196eb

@ -253,7 +253,7 @@ namespace
bool operator() (const MWWorld::Ptr& ptr)
{
if (!ptr.getRefData().isDeleted() && ptr.getRefData().isEnabled())
ptr.getClass().adjustPosition (ptr, true);
ptr.getClass().adjustPosition (ptr, false);
return true;
}
};

@ -1344,12 +1344,8 @@ namespace MWWorld
}
moveObject(ptr, ptr.getCell(), pos.x(), pos.y(), pos.z());
if (force) // force physics to use the new position
{
auto actor = mPhysics->getActor(ptr);
if(actor)
actor->resetPosition();
}
if (ptr.getClass().isActor())
mPhysics->getActor(ptr)->resetPosition();
}
void World::fixPosition()

Loading…
Cancel
Save