diff options
author | BlueSansDouze <bluesansdouze@gmail.com> | 2010-01-13 13:45:27 +0100 |
---|---|---|
committer | BlueSansDouze <bluesansdouze@gmail.com> | 2010-01-13 14:22:44 +0100 |
commit | 94bfab1a7d1ac3626d15c30b8c6668de9455f3ed (patch) | |
tree | e569de48e7553e86d2abf0822c2646c4b1c1f95a /src/game.cpp | |
parent | 61959f6a04c6a6712b5334ebd6bf21da4736431f (diff) | |
download | mana-94bfab1a7d1ac3626d15c30b8c6668de9455f3ed.tar.gz mana-94bfab1a7d1ac3626d15c30b8c6668de9455f3ed.tar.bz2 mana-94bfab1a7d1ac3626d15c30b8c6668de9455f3ed.tar.xz mana-94bfab1a7d1ac3626d15c30b8c6668de9455f3ed.zip |
Adds a follow manager for users
Right click contextual menu on player "follow" entry
Cancel the following by moving with mouse or keys
Adds a special behavior for map changes
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index ff947a24..c8f976a2 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -934,22 +934,26 @@ void Game::handleInput() (joystick && joystick->isUp())) { direction |= Being::UP; + player_node->cancelFollow(); } else if (keyboard.isKeyActive(keyboard.KEY_MOVE_DOWN) || (joystick && joystick->isDown())) { direction |= Being::DOWN; + player_node->cancelFollow(); } if (keyboard.isKeyActive(keyboard.KEY_MOVE_LEFT) || (joystick && joystick->isLeft())) { direction |= Being::LEFT; + player_node->cancelFollow(); } else if (keyboard.isKeyActive(keyboard.KEY_MOVE_RIGHT) || (joystick && joystick->isRight())) { direction |= Being::RIGHT; + player_node->cancelFollow(); } if (keyboard.isKeyActive(keyboard.KEY_EMOTE) && direction != 0) |