summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-14 12:54:59 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-14 12:54:59 +0000
commitfa555b6077e7cc7ab28c2ec07be1f5fb8a89125c (patch)
tree7d147040b140ea6034a3553de11de29da1743b42 /src/game.cpp
parentef3069f212029c4ca277c2dc369d5f04066ef186 (diff)
downloadmana-client-fa555b6077e7cc7ab28c2ec07be1f5fb8a89125c.tar.gz
mana-client-fa555b6077e7cc7ab28c2ec07be1f5fb8a89125c.tar.bz2
mana-client-fa555b6077e7cc7ab28c2ec07be1f5fb8a89125c.tar.xz
mana-client-fa555b6077e7cc7ab28c2ec07be1f5fb8a89125c.zip
Made attacking/aiming easier: Shift+Click = Don't walk, only interact.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 883fdcd5..178bfb87 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -422,10 +422,18 @@ void do_input()
// Mouse button left
if (event.button.button == SDL_BUTTON_LEFT)
{
+ // Don't move when shift is pressed
+ // 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]) {
+ used = true;
+ }
+
// Check for default actions for NPC/Monster/Players
Being *target = findNode(mx, my);
unsigned int floorItemId = find_floor_item_by_cor(mx, my);
-
+
if (target)
{
// NPC default: talk