summary refs log tree commit diff stats
path: root/src/components.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/components.cpp')
-rw-r--r--src/components.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components.cpp b/src/components.cpp index e41e2cd..d5261ef 100644 --- a/src/components.cpp +++ b/src/components.cpp
@@ -556,11 +556,11 @@ bool MapCollisionComponent::processCollision(Game& game, Entity& collider, Colli
556 if (dir == Direction::left) 556 if (dir == Direction::left)
557 { 557 {
558 collider.position.first = GAME_WIDTH-collider.size.first/2; 558 collider.position.first = GAME_WIDTH-collider.size.first/2;
559 game.loadMap(*(map.getLeftMap())); 559 game.loadMap(*map.getLeftMap());
560 } else if (dir == Direction::right) 560 } else if (dir == Direction::right)
561 { 561 {
562 collider.position.first = -collider.size.first/2; 562 collider.position.first = -collider.size.first/2;
563 game.loadMap(*(map.getRightMap())); 563 game.loadMap(*map.getRightMap());
564 } 564 }
565 565
566 return true; 566 return true;
@@ -610,6 +610,6 @@ void SimpleColliderComponent::receive(Game& game, Entity&, const Message& msg)
610{ 610{
611 if (msg.type == Message::Type::collision) 611 if (msg.type == Message::Type::collision)
612 { 612 {
613 callback(game, *(msg.collisionEntity)); 613 callback(game, *msg.collisionEntity);
614 } 614 }
615} 615}