forked from teamnwah/openmw-tes3coop
Fix crash when loading another game after dying
This commit is contained in:
parent
28185e2017
commit
bdb03926c2
1 changed files with 6 additions and 0 deletions
|
@ -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…
Reference in a new issue