diff options
Diffstat (limited to 'src/components/player_physics.cpp')
-rw-r--r-- | src/components/player_physics.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/player_physics.cpp b/src/components/player_physics.cpp index 1d14f35..40e9948 100644 --- a/src/components/player_physics.cpp +++ b/src/components/player_physics.cpp | |||
@@ -29,12 +29,12 @@ void PlayerPhysicsComponent::receive(Game&, Entity& entity, const Message& msg) | |||
29 | { | 29 | { |
30 | velocity.first = 0.0; | 30 | velocity.first = 0.0; |
31 | direction = 0; | 31 | direction = 0; |
32 | } else if (msg.type == Message::Type::stopMovingHorizontally) | 32 | } else if (msg.type == Message::Type::setHorizontalVelocity) |
33 | { | 33 | { |
34 | velocity.first = 0.0; | 34 | velocity.first = msg.velocity; |
35 | } else if (msg.type == Message::Type::stopMovingVertically) | 35 | } else if (msg.type == Message::Type::setVerticalVelocity) |
36 | { | 36 | { |
37 | velocity.second = 0.0; | 37 | velocity.second = msg.velocity; |
38 | } else if (msg.type == Message::Type::hitTheGround) | 38 | } else if (msg.type == Message::Type::hitTheGround) |
39 | { | 39 | { |
40 | if (isFalling) | 40 | if (isFalling) |