mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-27 05:37:25 +00:00
Fix crash when loading another game after dying
This commit is contained in:
parent
28185e2017
commit
bdb03926c2
@ -1783,6 +1783,12 @@ namespace MWWorld
|
||||
void World::renderPlayer()
|
||||
{
|
||||
mRendering->renderPlayer(mPlayer->getPlayer());
|
||||
|
||||
// At this point the Animation object is live, and the CharacterController associated with it must be created.
|
||||
// It has to be done at this point: resetCamera below does animation->setViewMode -> CharacterController::forceStateUpdate
|
||||
// so we should make sure not to use a "stale" controller for that.
|
||||
MWBase::Environment::get().getMechanicsManager()->add(mPlayer->getPlayer());
|
||||
|
||||
mPhysics->addActor(mPlayer->getPlayer());
|
||||
mRendering->resetCamera();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user