summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-15 23:17:00 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-15 23:17:00 +0000
commit97cac06ae12026f4be3765f68b0aea3caf02d8f0 (patch)
tree7b79d7e7319bfe542362ce3396295dd3aded3940 /src/game.cpp
parent81aee6c4c85649793d9cf38f5a5bc1bdfffdd78e (diff)
downloadmana-client-97cac06ae12026f4be3765f68b0aea3caf02d8f0.tar.gz
mana-client-97cac06ae12026f4be3765f68b0aea3caf02d8f0.tar.bz2
mana-client-97cac06ae12026f4be3765f68b0aea3caf02d8f0.tar.xz
mana-client-97cac06ae12026f4be3765f68b0aea3caf02d8f0.zip
Initialize joystick to NULL and allow right shift and control keys to be used.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 00b875f7..f6d569b1 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -71,7 +71,7 @@ int startX = 0, startY = 0;
int gameTime = 0;
Being *autoTarget = NULL;
Engine *engine = NULL;
-SDL_Joystick *joypad; /**< Joypad object */
+SDL_Joystick *joypad = NULL; /**< Joypad object */
OkDialog *deathNotice = NULL;
ConfirmDialog *exitConfirm = NULL;
@@ -491,7 +491,7 @@ void do_input()
// XXX Is this too hackish? I'm not sure if making the Gui
// class a KeyListener is a good idea and works as expected
// at all...
- if (keys[SDLK_LSHIFT]) {
+ if (keys[SDLK_LSHIFT] || keys[SDLK_RSHIFT]) {
used = true;
}
@@ -707,7 +707,7 @@ void do_input()
// Attacking monsters
if (player_node->action == STAND)
{
- if (keys[SDLK_LCTRL] || joy[JOY_BTN0])
+ if (keys[SDLK_LCTRL] || keys[SDLK_RCTRL] || joy[JOY_BTN0])
{
Being *monster = attack(x, y, player_node->direction);
if (monster == NULL && autoTarget != NULL)