Forgot const

deque
scrawl 10 years ago
parent 358257ca6b
commit 7f18f85a1d

@ -475,8 +475,8 @@ namespace MWMechanics
// restore fatigue // restore fatigue
const MWWorld::Store<ESM::GameSetting>& settings = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>(); const MWWorld::Store<ESM::GameSetting>& settings = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
static float fFatigueReturnBase = settings.find("fFatigueReturnBase")->getFloat (); static const float fFatigueReturnBase = settings.find("fFatigueReturnBase")->getFloat ();
static float fFatigueReturnMult = settings.find("fFatigueReturnMult")->getFloat (); static const float fFatigueReturnMult = settings.find("fFatigueReturnMult")->getFloat ();
float x = fFatigueReturnBase + fFatigueReturnMult * endurance; float x = fFatigueReturnBase + fFatigueReturnMult * endurance;

@ -567,12 +567,12 @@ namespace MWMechanics
const MWMechanics::NpcStats &playerStats = playerPtr.getClass().getNpcStats(playerPtr); const MWMechanics::NpcStats &playerStats = playerPtr.getClass().getNpcStats(playerPtr);
const MWWorld::Store<ESM::GameSetting>& gmst = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>(); const MWWorld::Store<ESM::GameSetting>& gmst = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();
static float fDispRaceMod = gmst.find("fDispRaceMod")->getFloat(); static const float fDispRaceMod = gmst.find("fDispRaceMod")->getFloat();
if (Misc::StringUtils::ciEqual(npc->mBase->mRace, player->mBase->mRace)) if (Misc::StringUtils::ciEqual(npc->mBase->mRace, player->mBase->mRace))
x += fDispRaceMod; x += fDispRaceMod;
static float fDispPersonalityMult = gmst.find("fDispPersonalityMult")->getFloat(); static const float fDispPersonalityMult = gmst.find("fDispPersonalityMult")->getFloat();
static float fDispPersonalityBase = gmst.find("fDispPersonalityBase")->getFloat(); static const float fDispPersonalityBase = gmst.find("fDispPersonalityBase")->getFloat();
x += fDispPersonalityMult * (playerStats.getAttribute(ESM::Attribute::Personality).getModified() - fDispPersonalityBase); x += fDispPersonalityMult * (playerStats.getAttribute(ESM::Attribute::Personality).getModified() - fDispPersonalityBase);
float reaction = 0; float reaction = 0;
@ -610,20 +610,20 @@ namespace MWMechanics
rank = 0; rank = 0;
} }
static float fDispFactionRankMult = gmst.find("fDispFactionRankMult")->getFloat(); static const float fDispFactionRankMult = gmst.find("fDispFactionRankMult")->getFloat();
static float fDispFactionRankBase = gmst.find("fDispFactionRankBase")->getFloat(); static const float fDispFactionRankBase = gmst.find("fDispFactionRankBase")->getFloat();
static float fDispFactionMod = gmst.find("fDispFactionMod")->getFloat(); static const float fDispFactionMod = gmst.find("fDispFactionMod")->getFloat();
x += (fDispFactionRankMult * rank x += (fDispFactionRankMult * rank
+ fDispFactionRankBase) + fDispFactionRankBase)
* fDispFactionMod * reaction; * fDispFactionMod * reaction;
static float fDispCrimeMod = gmst.find("fDispCrimeMod")->getFloat(); static const float fDispCrimeMod = gmst.find("fDispCrimeMod")->getFloat();
static float fDispDiseaseMod = gmst.find("fDispDiseaseMod")->getFloat(); static const float fDispDiseaseMod = gmst.find("fDispDiseaseMod")->getFloat();
x -= fDispCrimeMod * playerStats.getBounty(); x -= fDispCrimeMod * playerStats.getBounty();
if (playerStats.hasCommonDisease() || playerStats.hasBlightDisease()) if (playerStats.hasCommonDisease() || playerStats.hasBlightDisease())
x += fDispDiseaseMod; x += fDispDiseaseMod;
static float fDispWeaponDrawn = gmst.find("fDispWeaponDrawn")->getFloat(); static const float fDispWeaponDrawn = gmst.find("fDispWeaponDrawn")->getFloat();
if (playerStats.getDrawState() == MWMechanics::DrawState_Weapon) if (playerStats.getDrawState() == MWMechanics::DrawState_Weapon)
x += fDispWeaponDrawn; x += fDispWeaponDrawn;

Loading…
Cancel
Save