summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-03-18 20:11:50 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-03-18 20:11:50 +0000
commit9d4197b066ddb65ca1caf0ca2363f9909895d608 (patch)
tree01622b592aeb815962c194540aed810c4aecd9b1 /src/game.cpp
parentbe45cb2aeb32537d099cb1727ba0baf57bb49c58 (diff)
downloadmana-client-9d4197b066ddb65ca1caf0ca2363f9909895d608.tar.gz
mana-client-9d4197b066ddb65ca1caf0ca2363f9909895d608.tar.bz2
mana-client-9d4197b066ddb65ca1caf0ca2363f9909895d608.tar.xz
mana-client-9d4197b066ddb65ca1caf0ca2363f9909895d608.zip
KP1,3,7,9 support for diagonal walking
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 3ef47400..2c0b4f72 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -401,6 +401,26 @@ void do_input()
{
xDirection = 1;
}
+ if (keys[SDLK_KP1]) // Bottom Left
+ {
+ xDirection = -1;
+ yDirection = 1;
+ }
+ if (keys[SDLK_KP3]) // Bottom Right
+ {
+ xDirection = 1;
+ yDirection = 1;
+ }
+ if (keys[SDLK_KP7]) // Top Left
+ {
+ xDirection = -1;
+ yDirection = -1;
+ }
+ if (keys[SDLK_KP9]) // Top Right
+ {
+ xDirection = 1;
+ yDirection = -1;
+ }
if ( xDirection == 1 && yDirection == 0 ) // Right
{