summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-01-30 13:13:32 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-01-30 13:13:32 -0500
commit2c91a60b5fd79aa2c978ce4496a068f15a4df5cc (patch)
tree226c63daadac1700dccd05df2eddcd8587a79b59 /src
parent4c610d6ccff254df995343406e51a6724d2d17c5 (diff)
downloadtanetane-2c91a60b5fd79aa2c978ce4496a068f15a4df5cc.tar.gz
tanetane-2c91a60b5fd79aa2c978ce4496a068f15a4df5cc.tar.bz2
tanetane-2c91a60b5fd79aa2c978ce4496a068f15a4df5cc.zip
Pressing two opposite directions at once now prioritises one instead of doing both
Diffstat (limited to 'src')
-rw-r--r--src/party.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/party.cpp b/src/party.cpp index 19b9557..371514b 100644 --- a/src/party.cpp +++ b/src/party.cpp
@@ -32,9 +32,7 @@ void Party::move(Game& game, const Input& keystate) {
32 { 32 {
33 pLoc.y() -= MOVEMENT_SPEED; 33 pLoc.y() -= MOVEMENT_SPEED;
34 dir = Direction::up; 34 dir = Direction::up;
35 } 35 } else if (keystate.down)
36
37 if (keystate.down)
38 { 36 {
39 pLoc.y() += MOVEMENT_SPEED; 37 pLoc.y() += MOVEMENT_SPEED;
40 dir = Direction::down; 38 dir = Direction::down;
@@ -51,9 +49,7 @@ void Party::move(Game& game, const Input& keystate) {
51 } else { 49 } else {
52 dir = Direction::left; 50 dir = Direction::left;
53 } 51 }
54 } 52 } else if (keystate.right)
55
56 if (keystate.right)
57 { 53 {
58 pLoc.x() += MOVEMENT_SPEED; 54 pLoc.x() += MOVEMENT_SPEED;
59 55