From e0ef9008c682f7f3b0bac4fb81bcc9aa4a6ebd76 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 18 Sep 2013 15:14:25 +0200 Subject: [PATCH] Removed player movement via right mouse button. --- README.txt | 15 +++++++-------- src/Game.cpp | 4 ---- src/main.cpp | 2 ++ src/sprites/Player.cpp | 6 ------ src/sprites/Player.h | 1 - 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/README.txt b/README.txt index 52598f8..f366740 100644 --- a/README.txt +++ b/README.txt @@ -2,15 +2,14 @@ 2d top down shooter with tactical gameplay set in a procedurally generated world. ## Controls -WASD: move -Mouse: look -Lmb: shoot -Rmb: walk to position +WASD: walk +Mouse: aim +Left Mouse Button: shoot R: reload -Q: use left Gadget -E: use right Gadget -F: pick up item or swap Gadgets -Esc: exit +Q: use left gadget +E: use right gadget +F: pick up item or swap gadgets +Esc: exit game ## Dependencies - SFML diff --git a/src/Game.cpp b/src/Game.cpp index d389efb..e879d9e 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -322,10 +322,6 @@ Game::mouseDown(const sf::Event& event) { case sf::Mouse::Left: mPlayer->pullTrigger(); break; - case sf::Mouse::Right: - mPlayer->setDestination(convertCoordinates(event.mouseButton.x, - event.mouseButton.y)); - break; default: break; } diff --git a/src/main.cpp b/src/main.cpp index 479390b..84d5a91 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,6 +12,8 @@ #include "util/Vector.h" +// TODO: remove right click move (also in readme) + /** * Creates Game object. */ diff --git a/src/sprites/Player.cpp b/src/sprites/Player.cpp index f4446b4..8c0e25b 100644 --- a/src/sprites/Player.cpp +++ b/src/sprites/Player.cpp @@ -63,12 +63,6 @@ Player::setDirection(Direction direction, bool unset) { setSpeed(dirVec, getMovementSpeed()); } -void -Player::setDestination(const Vector2f& destination) { - mDirection = 0; - Character::setDestination(destination); -} - /** * Check if we arrived at destination, turn towards cursor. */ diff --git a/src/sprites/Player.h b/src/sprites/Player.h index 6ccf2c0..cd55cc3 100644 --- a/src/sprites/Player.h +++ b/src/sprites/Player.h @@ -37,7 +37,6 @@ public: using Character::pullTrigger; using Character::releaseTrigger; void setDirection(Direction direction, bool unset); - void setDestination(const Vector2f& destination); using Character::getWeaponName; using Character::reload; using Character::toggleWeapon;