1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00

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

This commit is contained in:
Alexei Kotov 2024-02-16 14:28:43 +03:00
parent 7873714103
commit aae74224e8

View File

@ -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)
{