Merge branch 'falling_actors' into 'master'

Do not adjust position for falling actors (#7009)

Closes #7009

See merge request OpenMW/openmw!2416
coverity_clang_test
psi29a 2 years ago
commit d05494bfb9

@ -18,6 +18,7 @@
Bug #6987: Set/Mod Blindness should not darken the screen Bug #6987: Set/Mod Blindness should not darken the screen
Bug #6992: Crossbow reloading doesn't look the same as in Morrowind 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 #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 #6933: Support high-resolution cursor textures
Feature #6945: Support S3TC-compressed and BGR/BGRA NiPixelData 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 Feature #6979: Add support of loading and displaying LOD assets purely based on their filename extension

@ -4,10 +4,12 @@
#include <memory> #include <memory>
#include "character.hpp" #include "character.hpp"
#include "creaturestats.hpp"
#include "greetingstate.hpp" #include "greetingstate.hpp"
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp" #include "../mwbase/world.hpp"
#include "../mwworld/class.hpp"
#include <components/misc/timer.hpp> #include <components/misc/timer.hpp>
@ -28,7 +30,7 @@ namespace MWMechanics
public: public:
Actor(const MWWorld::Ptr& ptr, MWRender::Animation* animation) Actor(const MWWorld::Ptr& ptr, MWRender::Animation* animation)
: mCharacterController(ptr, animation) : mCharacterController(ptr, animation)
, mPositionAdjusted(false) , mPositionAdjusted(ptr.getClass().getCreatureStats(ptr).getFallHeight() > 0)
{ {
} }

@ -8,6 +8,7 @@
#include <components/resource/bulletshape.hpp> #include <components/resource/bulletshape.hpp>
#include <components/sceneutil/positionattitudetransform.hpp> #include <components/sceneutil/positionattitudetransform.hpp>
#include "../mwmechanics/creaturestats.hpp"
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "collisiontype.hpp" #include "collisiontype.hpp"
@ -30,7 +31,7 @@ namespace MWPhysics
, mStuckFrames(0) , mStuckFrames(0)
, mLastStuckPosition{ 0, 0, 0 } , mLastStuckPosition{ 0, 0, 0 }
, mForce(0.f, 0.f, 0.f) , mForce(0.f, 0.f, 0.f)
, mOnGround(true) , mOnGround(ptr.getClass().getCreatureStats(ptr).getFallHeight() == 0)
, mOnSlope(false) , mOnSlope(false)
, mInternalCollisionMode(true) , mInternalCollisionMode(true)
, mExternalCollisionMode(true) , mExternalCollisionMode(true)

Loading…
Cancel
Save