Prevent air acceleration with 0 jump speed (#13036)

This commit is contained in:
Jude Melton-Houghton 2022-12-10 09:08:50 -05:00 committed by GitHub
parent 1798ad0ec4
commit c18c082059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -485,6 +485,9 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d,
m_can_jump = false;
}
// Prevent sliding on the ground when jump speed is 0
m_can_jump = m_can_jump && jumpspeed != 0.0f;
// Autojump
handleAutojump(dtime, env, result, initial_position, initial_speed, pos_max_d);
}