mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 17:11:33 +00:00
Merged pull request #1897
This commit is contained in:
commit
c280a71b33
3 changed files with 6 additions and 4 deletions
|
@ -108,6 +108,8 @@
|
||||||
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 #4607: Scaling for animated collision shapes is applied twice
|
Bug #4607: Scaling for animated collision shapes is applied twice
|
||||||
Bug #4615: Flicker effects for light sources are handled incorrectly
|
Bug #4615: Flicker effects for light sources are handled incorrectly
|
||||||
|
Bug #4617: First person sneaking offset is not applied while the character is in air
|
||||||
|
Bug #4618: Sneaking is possible while the character is flying
|
||||||
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
|
||||||
|
|
|
@ -1826,9 +1826,9 @@ void CharacterController::update(float duration)
|
||||||
bool onground = world->isOnGround(mPtr);
|
bool onground = world->isOnGround(mPtr);
|
||||||
bool incapacitated = (cls.getCreatureStats(mPtr).isParalyzed() || cls.getCreatureStats(mPtr).getKnockedDown());
|
bool incapacitated = (cls.getCreatureStats(mPtr).isParalyzed() || cls.getCreatureStats(mPtr).getKnockedDown());
|
||||||
bool inwater = world->isSwimming(mPtr);
|
bool inwater = world->isSwimming(mPtr);
|
||||||
bool sneak = cls.getCreatureStats(mPtr).getStance(MWMechanics::CreatureStats::Stance_Sneak);
|
|
||||||
bool flying = world->isFlying(mPtr);
|
bool flying = world->isFlying(mPtr);
|
||||||
// Can't run while flying (see speed formula in Npc/Creature::getSpeed)
|
// Can't run and sneak while flying (see speed formula in Npc/Creature::getSpeed)
|
||||||
|
bool sneak = cls.getCreatureStats(mPtr).getStance(MWMechanics::CreatureStats::Stance_Sneak) && !flying;
|
||||||
bool isrunning = cls.getCreatureStats(mPtr).getStance(MWMechanics::CreatureStats::Stance_Run) && !flying;
|
bool isrunning = cls.getCreatureStats(mPtr).getStance(MWMechanics::CreatureStats::Stance_Run) && !flying;
|
||||||
CreatureStats &stats = cls.getCreatureStats(mPtr);
|
CreatureStats &stats = cls.getCreatureStats(mPtr);
|
||||||
|
|
||||||
|
|
|
@ -1706,11 +1706,11 @@ 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);
|
||||||
|
bool flying = isFlying(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 && !flying)
|
||||||
mRendering->getCamera()->setSneakOffset(i1stPersonSneakDelta);
|
mRendering->getCamera()->setSneakOffset(i1stPersonSneakDelta);
|
||||||
else
|
else
|
||||||
mRendering->getCamera()->setSneakOffset(0.f);
|
mRendering->getCamera()->setSneakOffset(0.f);
|
||||||
|
|
Loading…
Reference in a new issue