summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-08 13:58:41 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-08 13:58:41 +0000
commit66fd67f04a113fd1f1052f879a890615d334024c (patch)
tree889b79e73829e64d8cf8c40c5df008ac2451bd8f
parentb9fc99b3d24e133b8170b375704a836300ed098d (diff)
downloadmana-66fd67f04a113fd1f1052f879a890615d334024c.tar.gz
mana-66fd67f04a113fd1f1052f879a890615d334024c.tar.bz2
mana-66fd67f04a113fd1f1052f879a890615d334024c.tar.xz
mana-66fd67f04a113fd1f1052f879a890615d334024c.zip
Updated change log and made mouse walk only work with left mouse button.
-rw-r--r--ChangeLog5
-rw-r--r--src/engine.cpp1
-rw-r--r--src/gui/gui.cpp19
3 files changed, 16 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 83fabc78..9601a38b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+0.0.11.2 (... April 2005)
+- Damage text now floats upwards
+- Mouse walk now only works with left mouse button
+- Fixed occasional crash on startup and exit
+
0.0.11.1 (7 April 2005)
- Buttons are now disabled when appropriate
- Fixed players standing on top of NPCs
diff --git a/src/engine.cpp b/src/engine.cpp
index 7ea5a91b..047fa332 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -288,7 +288,6 @@ void Engine::logic()
void Engine::draw()
{
- player_node->speed = 150;
// Get the current mouse position
int mouseX, mouseY;
SDL_GetMouseState(&mouseX, &mouseY);
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index c79d0833..436a5a1a 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -99,14 +99,17 @@ void Gui::draw()
void Gui::mousePress(int mx, int my, int button)
{
// Mouse pressed on window container (basically, the map)
- int tilex = mx / 32 + camera_x;
- int tiley = my / 32 + camera_y;
-
// Experimental mouse walk support
- if (state == GAME && tiledMap->getWalk(tilex, tiley)) {
- walk(tilex, tiley, 0);
- player_node->setPath(tiledMap->findPath(
- player_node->x, player_node->y,
- tilex, tiley));
+
+ if (button == gcn::MouseInput::LEFT) {
+ int tilex = mx / 32 + camera_x;
+ int tiley = my / 32 + camera_y;
+
+ if (state == GAME && tiledMap->getWalk(tilex, tiley)) {
+ walk(tilex, tiley, 0);
+ player_node->setPath(tiledMap->findPath(
+ player_node->x, player_node->y,
+ tilex, tiley));
+ }
}
}