Skip to content

Commit

Permalink
Player: Clear y axis velocity if the player is levitating
Browse files Browse the repository at this point in the history
Fixes: Issue #640
  • Loading branch information
bsxf-47 committed Jan 28, 2017
1 parent 77e86e2 commit 3d73e16
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/game/Player.cpp
Expand Up @@ -2290,6 +2290,10 @@ void PlayerMovementIterate(float DeltaTime) {
// Apply forces to velocity
player.physics.velocity += player.physics.forces * DeltaTime;

if(player.levitate) {
player.physics.velocity.y = 0.0f;
}

// Apply climbing velocity
if(player.climbing) {
if(player.m_currentMovement & PLAYER_MOVE_WALK_FORWARD) {
Expand Down

0 comments on commit 3d73e16

Please sign in to comment.