1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Don't recover normalise speed setting every frame

This commit is contained in:
Capostrophic 2019-04-24 16:22:56 +03:00
parent 5e9bd743a5
commit 8abe92fe41

View File

@ -2372,7 +2372,8 @@ void CharacterController::update(float duration, bool animationOnly)
moved.x() *= scale;
moved.y() *= scale;
if (mPtr.getClass().isNpc() && !Settings::Manager::getBool("normalise race speed", "Game"))
static const bool normalizeSpeed = Settings::Manager::getBool("normalise race speed", "Game");
if (mPtr.getClass().isNpc() && !normalizeSpeed)
{
const ESM::NPC* npc = mPtr.get<ESM::NPC>()->mBase;
const ESM::Race* race = world->getStore().get<ESM::Race>().find(npc->mRace);