Skip to content

Commit

Permalink
[ClientPlayer] Slightly reduce velocity in X/Z while jumping/falling.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Jan 26, 2020
1 parent 0a60a94 commit c2e70e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/source/world/ClientPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ void ClientPlayer::updatePosition(const ClientWorld &world) {
if (!Config::isNoClipEnabled)
checkCollisions(world);

if (!Config::isFlyModeEnabled && m_velocity.y != 0) {
m_velocity.x *= 0.75f;
m_velocity.z *= 0.75f;
}

m_x += m_velocity.x;
m_y += m_velocity.y;
m_z += m_velocity.z;
Expand Down

0 comments on commit c2e70e2

Please sign in to comment.