Fix waypoint movement removing flying animation for creatures

Fix flying creatures always moving forward ( maybe use flag only when really moving? )

--HG--
branch : trunk
This commit is contained in:
thenecromancer
2010-04-03 12:39:02 +02:00
parent e50b04f657
commit aa31f350b3
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -15945,7 +15945,7 @@ void Unit::BuildMovementPacket(ByteBuffer *data) const
{
case TYPEID_UNIT:
if (canFly())
const_cast<Unit*>(this)->AddUnitMovementFlag(MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_LEVITATING);
const_cast<Unit*>(this)->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
break;
case TYPEID_PLAYER:
// remove unknown, unused etc flags for now
+4
View File
@@ -86,6 +86,10 @@ void WaypointMovementGenerator<Creature>::InitTraveller(Creature &unit, const Wa
unit.SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
unit.SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
// TODO: make this part of waypoint node, so that creature can walk when desired?
if (unit.canFly())
SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x02);
unit.addUnitState(UNIT_STAT_ROAMING);
}