From 34ea9ea8134d1145087a6039d021bce69b7cfff2 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Wed, 17 Apr 2019 17:51:18 +0300 Subject: [PATCH] Add an option to restore MCP-like movement behavior --- apps/launcher/advancedpage.cpp | 2 ++ apps/openmw/mwmechanics/character.cpp | 2 +- files/settings-default.cfg | 3 +++ files/ui/advancedpage.ui | 10 ++++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index f098dcaa2..a8ff9a0ed 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -81,6 +81,7 @@ bool Launcher::AdvancedPage::loadSettings() unarmedFactorsStrengthComboBox->setCurrentIndex(unarmedFactorsStrengthIndex); loadSettingBool(requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game"); loadSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game"); + loadSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game"); // Input Settings loadSettingBool(allowThirdPersonZoomCheckBox, "allow third person zoom", "Input"); @@ -141,6 +142,7 @@ void Launcher::AdvancedPage::saveSettings() mEngineSettings.setInt("strength influences hand to hand", "Game", unarmedFactorsStrengthIndex); saveSettingBool(requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game"); saveSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game"); + saveSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game"); // Input Settings saveSettingBool(allowThirdPersonZoomCheckBox, "allow third person zoom", "Input"); diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index c8a99174b..8a6101cd5 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -2372,7 +2372,7 @@ void CharacterController::update(float duration, bool animationOnly) moved.x() *= scale; moved.y() *= scale; - if(mPtr.getClass().isNpc()) + if (mPtr.getClass().isNpc() && !Settings::Manager::getBool("normalise race speed", "Game")) { const ESM::NPC* npc = mPtr.get()->mBase; const ESM::Race* race = world->getStore().get().find(npc->mRace); diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 71260c37b..217f11d13 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -261,6 +261,9 @@ only appropriate ammunition bypasses resistance = false # Use casting animations for magic items, just as for spells use magic item animations = false +# Don't use race weight in NPC movement speed calculations +normalise race speed = false + [General] # Anisotropy reduces distortion in textures at low angles (e.g. 0 to 16). diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui index 4aaffe936..f7575cd2b 100644 --- a/files/ui/advancedpage.ui +++ b/files/ui/advancedpage.ui @@ -159,6 +159,16 @@ + + + + <html><head/><body><p>Don't use race weight in NPC movement speed calculations.</p></body></html> + + + Normalise race speed + + +