diff options
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index e9386a5ee..c91532227 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -123,7 +123,8 @@ LocalPlayer::LocalPlayer(int id, int subtype): mLastHitFrom(""), mWaitFor(""), mAdvertTime(0), - mBlockAdvert(false) + mBlockAdvert(false), + mNextStep(false) { logger->log1("LocalPlayer::LocalPlayer"); @@ -222,8 +223,9 @@ void LocalPlayer::logic() if (mActivityTime == 0 || mLastAction != -1) mActivityTime = cur_time; - if (mAction != MOVE && !mNavigatePath.empty()) + if ((mAction != MOVE || mNextStep) && !mNavigatePath.empty()) { + mNextStep = false; int dist = 5; if (!mSyncPlayerMove) dist = 20; @@ -844,7 +846,17 @@ void LocalPlayer::nextTile(unsigned char dir A_UNUSED = 0) mPath.clear(); } - Being::nextTile(); + if (mPath.empty()) + { + if (mNavigatePath.empty() || mAction != MOVE) + setAction(STAND); + else + mNextStep = true; + } + else + { + Being::nextTile(); + } } #ifdef MANASERV_SUPPORT else |