From 953954ff950f00ff2188b4a5588434e7e28e950f Mon Sep 17 00:00:00 2001 From: elsid Date: Sat, 17 Sep 2022 00:59:46 +0200 Subject: [PATCH 1/2] Do not adjust position for falling actors --- CHANGELOG.md | 1 + apps/openmw/mwmechanics/actor.hpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 923b58edf9..7d3d2988ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Bug #6987: Set/Mod Blindness should not darken the screen Bug #6992: Crossbow reloading doesn't look the same as in Morrowind Bug #6993: Shooting your last round of ammunition causes the attack animation to cancel + Bug #7009: Falling actors teleport to the ground without receiving any damage on cell loading Feature #6933: Support high-resolution cursor textures Feature #6945: Support S3TC-compressed and BGR/BGRA NiPixelData Feature #6979: Add support of loading and displaying LOD assets purely based on their filename extension diff --git a/apps/openmw/mwmechanics/actor.hpp b/apps/openmw/mwmechanics/actor.hpp index b9f1f97a4b..d7438712d9 100644 --- a/apps/openmw/mwmechanics/actor.hpp +++ b/apps/openmw/mwmechanics/actor.hpp @@ -4,10 +4,12 @@ #include #include "character.hpp" +#include "creaturestats.hpp" #include "greetingstate.hpp" #include "../mwbase/environment.hpp" #include "../mwbase/world.hpp" +#include "../mwworld/class.hpp" #include @@ -28,7 +30,7 @@ namespace MWMechanics public: Actor(const MWWorld::Ptr& ptr, MWRender::Animation* animation) : mCharacterController(ptr, animation) - , mPositionAdjusted(false) + , mPositionAdjusted(ptr.getClass().getCreatureStats(ptr).getFallHeight() > 0) { } From 1fc7bd7775652e7641481f95dc7db8b03d151b25 Mon Sep 17 00:00:00 2001 From: elsid Date: Tue, 20 Sep 2022 00:30:05 +0200 Subject: [PATCH 2/2] Do not consider falling actors as grounded --- apps/openmw/mwphysics/actor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwphysics/actor.cpp b/apps/openmw/mwphysics/actor.cpp index 9c7d6c964e..d243415b48 100644 --- a/apps/openmw/mwphysics/actor.cpp +++ b/apps/openmw/mwphysics/actor.cpp @@ -8,6 +8,7 @@ #include #include +#include "../mwmechanics/creaturestats.hpp" #include "../mwworld/class.hpp" #include "collisiontype.hpp" @@ -30,7 +31,7 @@ namespace MWPhysics , mStuckFrames(0) , mLastStuckPosition{ 0, 0, 0 } , mForce(0.f, 0.f, 0.f) - , mOnGround(true) + , mOnGround(ptr.getClass().getCreatureStats(ptr).getFallHeight() == 0) , mOnSlope(false) , mInternalCollisionMode(true) , mExternalCollisionMode(true)