From 1cc27f15b1f8d74bbc31262f2e7417adf01a63a8 Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Wed, 16 Apr 2008 11:59:36 +0000 Subject: Cancel walking to a clicked monster if the target is lost while getting to it (killed or otherwise removed). --- ChangeLog | 2 ++ src/localplayer.cpp | 5 +++++ 2 files changed, 7 insertions(+) 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 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(); } -- cgit v1.2.3-70-g09d2