summary refs log tree commit diff stats
path: root/src/components/physics_body.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/physics_body.cpp')
-rw-r--r--src/components/physics_body.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/physics_body.cpp b/src/components/physics_body.cpp index acbdc5d..97394d1 100644 --- a/src/components/physics_body.cpp +++ b/src/components/physics_body.cpp
@@ -13,12 +13,12 @@ void PhysicsBodyComponent::receive(Game&, Entity&, const Message& msg)
13 } else if (msg.type == Message::Type::stopWalking) 13 } else if (msg.type == Message::Type::stopWalking)
14 { 14 {
15 velocity.first = 0.0; 15 velocity.first = 0.0;
16 } else if (msg.type == Message::Type::stopMovingHorizontally) 16 } else if (msg.type == Message::Type::setHorizontalVelocity)
17 { 17 {
18 velocity.first = 0.0; 18 velocity.first = msg.velocity;
19 } else if (msg.type == Message::Type::stopMovingVertically) 19 } else if (msg.type == Message::Type::setVerticalVelocity)
20 { 20 {
21 velocity.second = 0.0; 21 velocity.second = msg.velocity;
22 } 22 }
23} 23}
24 24