From 9e8de69a19edfdf52da54ded3d098cf6282ccdc9 Mon Sep 17 00:00:00 2001 From: clyne Date: Sun, 1 Sep 2019 12:58:59 -0400 Subject: Oops, swap left and right player movement --- src/player.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/player.cpp b/src/player.cpp index 22bd0ef..c72a4e4 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -53,10 +53,10 @@ void PlayerSystem::receive(const KeyDownEvent& kue) if (player.valid()) { if (kue.sym == SDLK_a) { if (auto vel = player.component(); vel) - vel->x += GROUND_VELOCITY; + vel->x -= GROUND_VELOCITY; } else if (kue.sym == SDLK_d) { if (auto vel = player.component(); vel) - vel->x -= GROUND_VELOCITY; + vel->x += GROUND_VELOCITY; } } } @@ -66,10 +66,10 @@ void PlayerSystem::receive(const KeyUpEvent& kue) if (player.valid()) { if (kue.sym == SDLK_a) { if (auto vel = player.component(); vel) - vel->x -= GROUND_VELOCITY; + vel->x += GROUND_VELOCITY; } else if (kue.sym == SDLK_d) { if (auto vel = player.component(); vel) - vel->x += GROUND_VELOCITY; + vel->x -= GROUND_VELOCITY; } } } -- cgit v1.2.3