From de4d8c3a0424e27d20026192d1fcfe63300effaf Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Mon, 18 Jan 2010 20:38:02 +0100 Subject: [PATCH] [9210] Fix visual bug making npc run-in-same-position in client. Not send MOVEMENTFLAG_FORWARD (even if expected). As result npc will not run in same position when npc becomes visible at client side. Signed-off-by: NoFantasy --- src/game/Object.cpp | 7 ++++--- src/shared/revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 8ddafd88e..f5c84d20b 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -263,14 +263,15 @@ void Object::BuildMovementUpdate(ByteBuffer * data, uint16 flags, uint32 flags2) { flags2 = MOVEMENTFLAG_NONE; - if (!((Creature*)this)->IsStopped()) - flags2 |= MOVEMENTFLAG_FORWARD; // not set if not really moving + // disabled, makes them run-in-same-place before movement generator updated once. + /*if (((Creature*)this)->hasUnitState(UNIT_STAT_MOVING)) + flags2 |= MOVEMENTFLAG_FORWARD;*/ // not set if not really moving if (((Creature*)this)->canFly()) { flags2 |= MOVEMENTFLAG_LEVITATING; // (ok) most seem to have this - if (((Creature*)this)->IsStopped()) + if (!((Creature*)this)->hasUnitState(UNIT_STAT_MOVING)) flags2 |= MOVEMENTFLAG_FLY_UNK1; // (ok) possibly some "hover" mode else { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 53a6e6cfa..8b29a0301 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9209" + #define REVISION_NR "9210" #endif // __REVISION_NR_H__