1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Merge branch 'unbreak_actors_loading' into 'master'

Unbreak floating corpses and spawn

Closes #5735

See merge request OpenMW/openmw!457
This commit is contained in:
Alexei Dobrohotov 2020-12-12 18:00:05 +00:00
commit 264a6e0269
2 changed files with 3 additions and 7 deletions

View File

@ -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;
}
};

View File

@ -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()