Fix shadowing warnings

This commit is contained in:
Allofich 2017-04-20 20:44:42 +09:00
parent ff3e307059
commit ff3cb18d4f
2 changed files with 3 additions and 6 deletions

View file

@ -246,8 +246,8 @@ namespace MWGui
mReviewDialog->setBirthSign(player.getBirthSign()); mReviewDialog->setBirthSign(player.getBirthSign());
{ {
MWWorld::Ptr player = MWMechanics::getPlayer(); MWWorld::Ptr playerPtr = MWMechanics::getPlayer();
const MWMechanics::CreatureStats& stats = player.getClass().getCreatureStats(player); const MWMechanics::CreatureStats& stats = playerPtr.getClass().getCreatureStats(playerPtr);
mReviewDialog->setHealth ( stats.getHealth() ); mReviewDialog->setHealth ( stats.getHealth() );
mReviewDialog->setMagicka( stats.getMagicka() ); mReviewDialog->setMagicka( stats.getMagicka() );

View file

@ -795,7 +795,7 @@ namespace MWMechanics
NpcStats &stats = ptr.getClass().getNpcStats(ptr); NpcStats &stats = ptr.getClass().getNpcStats(ptr);
// When npc stats are just initialized, mTimeToStartDrowning == -1 and we should get value from GMST // When npc stats are just initialized, mTimeToStartDrowning == -1 and we should get value from GMST
static const int fHoldBreathTime = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fHoldBreathTime")->getFloat(); static const float fHoldBreathTime = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fHoldBreathTime")->getFloat();
if (stats.getTimeToStartDrowning() == -1.f) if (stats.getTimeToStartDrowning() == -1.f)
stats.setTimeToStartDrowning(fHoldBreathTime); stats.setTimeToStartDrowning(fHoldBreathTime);
@ -835,10 +835,7 @@ namespace MWMechanics
} }
} }
else else
{
static const float fHoldBreathTime = world->getStore().get<ESM::GameSetting>().find("fHoldBreathTime")->getFloat();
stats.setTimeToStartDrowning(fHoldBreathTime); stats.setTimeToStartDrowning(fHoldBreathTime);
}
} }
void Actors::updateEquippedLight (const MWWorld::Ptr& ptr, float duration) void Actors::updateEquippedLight (const MWWorld::Ptr& ptr, float duration)