mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 19:11:32 +00:00
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).
This commit is contained in:
parent
daf6c9f88f
commit
a314f196eb
2 changed files with 3 additions and 7 deletions
|
@ -253,7 +253,7 @@ namespace
|
||||||
bool operator() (const MWWorld::Ptr& ptr)
|
bool operator() (const MWWorld::Ptr& ptr)
|
||||||
{
|
{
|
||||||
if (!ptr.getRefData().isDeleted() && ptr.getRefData().isEnabled())
|
if (!ptr.getRefData().isDeleted() && ptr.getRefData().isEnabled())
|
||||||
ptr.getClass().adjustPosition (ptr, true);
|
ptr.getClass().adjustPosition (ptr, false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1344,12 +1344,8 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
|
|
||||||
moveObject(ptr, ptr.getCell(), pos.x(), pos.y(), pos.z());
|
moveObject(ptr, ptr.getCell(), pos.x(), pos.y(), pos.z());
|
||||||
if (force) // force physics to use the new position
|
if (ptr.getClass().isActor())
|
||||||
{
|
mPhysics->getActor(ptr)->resetPosition();
|
||||||
auto actor = mPhysics->getActor(ptr);
|
|
||||||
if(actor)
|
|
||||||
actor->resetPosition();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::fixPosition()
|
void World::fixPosition()
|
||||||
|
|
Loading…
Reference in a new issue