Prevent swim upward correction from causing false-positive jumping events (#7833)

fix-osga-rotate-wildly
Alexei Kotov 11 months ago
parent 7873714103
commit aae74224e8

@ -2146,7 +2146,12 @@ namespace MWMechanics
mInJump = false;
const float jumpHeight = cls.getJump(mPtr);
if (jumpHeight <= 0.f || sneak || inwater || flying || !solid)
{
vec.z() = 0.f;
// Following code might assign some vertical movement regardless, need to reset this manually
// This is used for jumping detection
movementSettings.mPosition[2] = 0;
}
if (!inwater && !flying && solid)
{

Loading…
Cancel
Save