summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-11 15:09:21 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-11 15:09:21 +0000
commitaf7060d953e1c0f54a7d5bf46894191d41d853ff (patch)
treee98737c9d15a30e4eade2f63fa97cf65e6b75e72 /src/game.cpp
parent041c6e3cb599d019d1e92d5087ec6726a5970902 (diff)
downloadmana-client-af7060d953e1c0f54a7d5bf46894191d41d853ff.tar.gz
mana-client-af7060d953e1c0f54a7d5bf46894191d41d853ff.tar.bz2
mana-client-af7060d953e1c0f54a7d5bf46894191d41d853ff.tar.xz
mana-client-af7060d953e1c0f54a7d5bf46894191d41d853ff.zip
Walk with arrow keys too.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 26c99f93..0465cfea 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -162,7 +162,7 @@ void do_input() {
int x = get_x(player_node->coordinates);
int y = get_y(player_node->coordinates);
- if(key[KEY_8_PAD]) {
+ if(key[KEY_8_PAD] || key[KEY_UP]) {
if(get_walk(x, y-1)!=0) {
walk(x, y-1, NORTH);
walk_status = 1;
@@ -172,7 +172,7 @@ void do_input() {
player_node->tick_time = tick_time;
set_coordinates(player_node->coordinates, x, y-1, NORTH);
} else set_coordinates(player_node->coordinates, x, y, NORTH);
- } else if(key[KEY_2_PAD]) {
+ } else if(key[KEY_2_PAD] || key[KEY_DOWN]) {
if(get_walk(x, y+1)!=0) {
walk(x, y+1, SOUTH);
walk_status = 1;
@@ -182,7 +182,7 @@ void do_input() {
player_node->tick_time = tick_time;
set_coordinates(player_node->coordinates, x, y+1, SOUTH);
} else set_coordinates(player_node->coordinates, x, y, SOUTH);
- } else if(key[KEY_4_PAD]) {
+ } else if(key[KEY_4_PAD] || key[KEY_LEFT]) {
if(get_walk(x-1, y)!=0) {
walk(x-1, y, WEST);
walk_status = 1;
@@ -192,7 +192,7 @@ void do_input() {
player_node->tick_time = tick_time;
set_coordinates(player_node->coordinates, x-1, y, WEST);
} else set_coordinates(player_node->coordinates, x, y, WEST);
- } else if(key[KEY_6_PAD]) {
+ } else if(key[KEY_6_PAD] || key[KEY_RIGHT]) {
if(get_walk(x+1, y)!=0) {
walk(x+1, y, EAST);
walk_status = 1;