mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-10 15:45:37 +00:00
Apply sneaking offset to camera while the character is in air (bug #4617)
This commit is contained in:
parent
232ea4f793
commit
2564fcc37e
@ -105,6 +105,7 @@
|
|||||||
Bug #4591: Attack strength should be 0 if player did not hold the attack button
|
Bug #4591: Attack strength should be 0 if player did not hold the attack button
|
||||||
Bug #4597: <> operator causes a compile error
|
Bug #4597: <> operator causes a compile error
|
||||||
Bug #4604: Picking up gold from the ground only makes 1 grabbed
|
Bug #4604: Picking up gold from the ground only makes 1 grabbed
|
||||||
|
Bug #4617: First person sneaking offset is not applied while the character is in air
|
||||||
Feature #1645: Casting effects from objects
|
Feature #1645: Casting effects from objects
|
||||||
Feature #2606: Editor: Implemented (optional) case sensitive global search
|
Feature #2606: Editor: Implemented (optional) case sensitive global search
|
||||||
Feature #3083: Play animation when NPC is casting spell via script
|
Feature #3083: Play animation when NPC is casting spell via script
|
||||||
|
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user