From 29259f72663e0eb1820b4d4a0f018acef61bfb2c Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Tue, 15 Mar 2011 23:09:17 +0100 Subject: Made the tA Beinghandler avoid dealing with flawed coordinates. Also fixed again a condition in Being::logic(). I'll beautify the code in tmwAthena:Beinghandler once everything will be working better. Note: I also suspect current clients to flood the server with keyboard messages, hence blocking the animation when they are remote. I'll need to test that with someone having the same client than here.. --- src/being.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/being.cpp') diff --git a/src/being.cpp b/src/being.cpp index 8c7f45bb..b79b65b3 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -673,6 +673,8 @@ void Being::logic() mText = 0; } + ActorSprite::logic(); + if ((mAction != DEAD) && !mSpeedPixelsPerTick.isNull()) { const Vector dest = (mPath.empty()) ? @@ -680,7 +682,7 @@ void Being::logic() mPath.front().y); // Avoid going to flawed destinations - if (mDest.x <= 0 || mDest.y <= 0) + if (dest.x <= 0 || dest.y <= 0) { // We make the being stop move in that case. mDest = mPos; @@ -768,8 +770,6 @@ void Being::logic() } } - ActorSprite::logic(); - // Remove it after 3 secs. TODO: Just play the dead animation before removing if (!isAlive() && Net::getGameHandler()->removeDeadBeings() && get_elapsed_time(mActionTime) > 3000) -- cgit v1.2.3-70-g09d2