summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Friis <peavey@placid.dk>2008-04-16 11:59:36 +0000
committerDennis Friis <peavey@placid.dk>2008-04-16 11:59:36 +0000
commit1cc27f15b1f8d74bbc31262f2e7417adf01a63a8 (patch)
tree916f6a10040d347ea222001a1a66e8c22bf2113a
parent4e0253cfd7c6a7684341f55f4a1f3dd88eeb5609 (diff)
downloadmana-1cc27f15b1f8d74bbc31262f2e7417adf01a63a8.tar.gz
mana-1cc27f15b1f8d74bbc31262f2e7417adf01a63a8.tar.bz2
mana-1cc27f15b1f8d74bbc31262f2e7417adf01a63a8.tar.xz
mana-1cc27f15b1f8d74bbc31262f2e7417adf01a63a8.zip
Cancel walking to a clicked monster if the target is lost while getting to it (killed or otherwise removed).
-rw-r--r--ChangeLog2
-rw-r--r--src/localplayer.cpp5
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 96be82e7..cb28b5b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
* src/gui/browserbox.cpp: Fix a basic_string::at sometimes being out
of range in BrowserBox::draw when checking for line separators and
color codes.
+ * src/localplayer.cpp: Cancel walking to a clicked monster if the
+ target is lost while getting to it (killed or otherwise removed).
2008-04-16 Bjørn Lindeijer <bjorn@lindeijer.nl>
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 2aae199e..20f6b6a7 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -116,6 +116,11 @@ void LocalPlayer::nextStep()
mPath.clear();
return;
}
+ else if (mGoingToTarget && !mTarget)
+ {
+ mGoingToTarget = false;
+ mPath.clear();
+ }
Player::nextStep();
}