From c64351b3e8b723e4159f3b524091edb50485e386 Mon Sep 17 00:00:00 2001 From: MiroslavR Date: Sat, 21 Jan 2017 03:39:51 +0100 Subject: [PATCH] ESS-import: player is no longer disabled (Bug #3246) --- apps/essimporter/importercontext.hpp | 1 + apps/openmw/mwworld/player.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/apps/essimporter/importercontext.hpp b/apps/essimporter/importercontext.hpp index 6921cce925..0ad73c2672 100644 --- a/apps/essimporter/importercontext.hpp +++ b/apps/essimporter/importercontext.hpp @@ -69,6 +69,7 @@ namespace ESSImport mPlayer.mHasMark = 0; mPlayer.mCurrentCrimeId = 0; // TODO mPlayer.mObject.blank(); + mPlayer.mObject.mEnabled = true; mPlayer.mObject.mRef.mRefID = "player"; // REFR.mRefID would be PlayerSaveGame mGlobalMapState.mBounds.mMinX = 0; diff --git a/apps/openmw/mwworld/player.cpp b/apps/openmw/mwworld/player.cpp index b8eedec238..a44d79157f 100644 --- a/apps/openmw/mwworld/player.cpp +++ b/apps/openmw/mwworld/player.cpp @@ -328,6 +328,12 @@ namespace MWWorld throw std::runtime_error ("invalid player state record (object state)"); } + if (!player.mObject.mEnabled) + { + std::cerr << "Savegame attempted to disable the player." << std::endl; + player.mObject.mEnabled = true; + } + mPlayer.load (player.mObject); for (int i=0; i