From e30685357055f0fddfae10fc242477882cc847f2 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 1 Jun 2015 00:50:48 +0200 Subject: [PATCH] Fix chargen crash --- apps/openmw/mwworld/worldimp.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 768177b16..926e453b8 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1542,8 +1542,7 @@ namespace MWWorld } const ESM::NPC *ret = mStore.insert(record); if (update) { - mRendering->renderPlayer(getPlayerPtr()); - scaleObject(getPlayerPtr(), 1.f); // apply race height + renderPlayer(); } return ret; } @@ -2118,13 +2117,12 @@ namespace MWWorld void World::renderPlayer() { + MWBase::Environment::get().getMechanicsManager()->remove(getPlayerPtr()); + mRendering->renderPlayer(getPlayerPtr()); scaleObject(getPlayerPtr(), 1.f); // apply race height - // 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(getPlayerPtr()); std::string model = getPlayerPtr().getClass().getModel(getPlayerPtr());