summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-10-02 18:57:10 +0300
committerAndrei Karas <akaras@inbox.ru>2011-10-02 18:57:10 +0300
commitf1e92aca00a4859047e83fab76220767b9a2f814 (patch)
tree8aaa9d6853c6a8e0e8fc568c6f981cbd889b0cc3 /src/game.cpp
parent70b520b1e876f9698bb95baa2d274ea289a0c6bd (diff)
parent99771a1fb50286fdb0b511f425312503e657eddc (diff)
downloadplus-f1e92aca00a4859047e83fab76220767b9a2f814.tar.gz
plus-f1e92aca00a4859047e83fab76220767b9a2f814.tar.bz2
plus-f1e92aca00a4859047e83fab76220767b9a2f814.tar.xz
plus-f1e92aca00a4859047e83fab76220767b9a2f814.zip
Merge branch 'master' into strippedstripped1.1.10.2
Conflicts: packaging/debian/watch
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/game.cpp b/src/game.cpp
index d82f13913..0527e8481 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1148,6 +1148,7 @@ void Game::handleInput()
&& !NpcDialog::isAnyInputFocused()
&& (!player_node || !player_node->getAwayMode())
&& !keyboard.isKeyActive(keyboard.KEY_TARGET)
+ && !keyboard.isKeyActive(keyboard.KEY_UNTARGET)
&& !InventoryWindow::isAnyInputFocused())
{
// const int tKey = keyboard.getKeyIndex(event.key.keysym.sym);
@@ -1366,11 +1367,9 @@ void Game::handleInput()
{ // window restore
Client::setIsMinimized(false);
if (!player_node && !player_node->getAwayMode())
- {
fpsLimit = config.getIntValue("fpslimit");
- if (player_node)
- player_node->setHalfAway(false);
- }
+ if (player_node)
+ player_node->setHalfAway(false);
}
else
{ // window minimisation
@@ -1613,7 +1612,8 @@ void Game::handleInput()
keyboard.isKeyActive(keyboard.KEY_TARGET_CLOSEST) ||
keyboard.isKeyActive(keyboard.KEY_TARGET_NPC) ||
(joystick && joystick->buttonPressed(3))) &&
- !keyboard.isKeyActive(keyboard.KEY_TARGET))
+ !keyboard.isKeyActive(keyboard.KEY_TARGET) &&
+ !keyboard.isKeyActive(keyboard.KEY_UNTARGET))
{
ActorSprite::Type currentTarget = ActorSprite::UNKNOWN;
if (keyboard.isKeyActive(keyboard.KEY_TARGET_CLOSEST) ||
@@ -1665,10 +1665,12 @@ void Game::handleInput()
// Stop attacking if the right key is pressed
if (!keyboard.isKeyActive(keyboard.KEY_ATTACK)
- && keyboard.isKeyActive(keyboard.KEY_TARGET)
&& !keyboard.isKeyActive(keyboard.KEY_EMOTE))
{
- player_node->stopAttack();
+ if (keyboard.isKeyActive(keyboard.KEY_TARGET))
+ player_node->stopAttack();
+ else if (keyboard.isKeyActive(keyboard.KEY_UNTARGET))
+ player_node->untarget();
}
if (joystick)