diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-23 12:15:43 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-23 12:15:43 -0400 |
commit | b5e018343cd429b0823578964c53c486540c7812 (patch) | |
tree | 6b5fa28a4fe7d56714005c7ed7b095a8a7d40eda /src | |
parent | 6cfb7817bf4786326fddeaf4f13675ce22ecec24 (diff) | |
download | ether-b5e018343cd429b0823578964c53c486540c7812.tar.gz ether-b5e018343cd429b0823578964c53c486540c7812.tar.bz2 ether-b5e018343cd429b0823578964c53c486540c7812.zip |
holding opposite directions doesn't cancel each other out anymore
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/game.cpp b/src/game.cpp index 7c82a38..c965cd3 100644 --- a/src/game.cpp +++ b/src/game.cpp | |||
@@ -511,9 +511,7 @@ bool Game::processKeys(const Input& keystate) | |||
511 | if (keystate.up) | 511 | if (keystate.up) |
512 | { | 512 | { |
513 | py--; | 513 | py--; |
514 | } | 514 | } else if (keystate.down) |
515 | |||
516 | if (keystate.down) | ||
517 | { | 515 | { |
518 | py++; | 516 | py++; |
519 | dir = Direction::down; | 517 | dir = Direction::down; |
@@ -523,9 +521,7 @@ bool Game::processKeys(const Input& keystate) | |||
523 | { | 521 | { |
524 | px--; | 522 | px--; |
525 | dir = Direction::left; | 523 | dir = Direction::left; |
526 | } | 524 | } else if (keystate.right) |
527 | |||
528 | if (keystate.right) | ||
529 | { | 525 | { |
530 | px++; | 526 | px++; |
531 | dir = Direction::right; | 527 | dir = Direction::right; |