|
|
@ -1706,11 +1706,10 @@ namespace MWWorld
|
|
|
|
|
|
|
|
|
|
|
|
// Sink the camera while sneaking
|
|
|
|
// Sink the camera while sneaking
|
|
|
|
bool sneaking = player.getClass().getCreatureStats(getPlayerPtr()).getStance(MWMechanics::CreatureStats::Stance_Sneak);
|
|
|
|
bool sneaking = player.getClass().getCreatureStats(getPlayerPtr()).getStance(MWMechanics::CreatureStats::Stance_Sneak);
|
|
|
|
bool inair = !isOnGround(player);
|
|
|
|
|
|
|
|
bool swimming = isSwimming(player);
|
|
|
|
bool swimming = isSwimming(player);
|
|
|
|
|
|
|
|
|
|
|
|
static const float i1stPersonSneakDelta = getStore().get<ESM::GameSetting>().find("i1stPersonSneakDelta")->getFloat();
|
|
|
|
static const float i1stPersonSneakDelta = getStore().get<ESM::GameSetting>().find("i1stPersonSneakDelta")->getFloat();
|
|
|
|
if (sneaking && !(swimming || inair))
|
|
|
|
if (sneaking && !swimming)
|
|
|
|
mRendering->getCamera()->setSneakOffset(i1stPersonSneakDelta);
|
|
|
|
mRendering->getCamera()->setSneakOffset(i1stPersonSneakDelta);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
mRendering->getCamera()->setSneakOffset(0.f);
|
|
|
|
mRendering->getCamera()->setSneakOffset(0.f);
|
|
|
|