aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/PointMovementGenerator.cpp3
-rw-r--r--src/game/RandomMovementGenerator.cpp9
-rw-r--r--src/game/TargetedMovementGenerator.cpp8
-rw-r--r--src/game/WaypointMovementGenerator.cpp3
4 files changed, 2 insertions, 21 deletions
diff --git a/src/game/PointMovementGenerator.cpp b/src/game/PointMovementGenerator.cpp
index ffd036e9c21..3452c0a3b4d 100644
--- a/src/game/PointMovementGenerator.cpp
+++ b/src/game/PointMovementGenerator.cpp
@@ -33,9 +33,6 @@ void PointMovementGenerator<T>::Initialize(T &unit)
Traveller<T> traveller(unit);
// knockback effect has UNIT_STAT_JUMPING set,so if here we disable sentmonstermove there will be creature position sync problem between client and server
i_destinationHolder.SetDestination(traveller,i_x,i_y,i_z, true /* !unit.hasUnitState(UNIT_STAT_JUMPING)*/);
-
- if (unit.GetTypeId() == TYPEID_UNIT && ((Creature*)&unit)->canFly())
- unit.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
}
template<class T>
diff --git a/src/game/RandomMovementGenerator.cpp b/src/game/RandomMovementGenerator.cpp
index d93689514c9..f50e6af4709 100644
--- a/src/game/RandomMovementGenerator.cpp
+++ b/src/game/RandomMovementGenerator.cpp
@@ -123,7 +123,6 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
if (is_air_ok)
{
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
- creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
}
//else if (is_water_ok) // Swimming mode to be done with more than this check
else
@@ -149,9 +148,7 @@ RandomMovementGenerator<Creature>::Initialize(Creature &creature)
if(!wander_distance)
wander_distance = creature.GetRespawnRadius();
- if (creature.canFly())
- creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
- else if(irand(0,RUNNING_CHANCE_RANDOMMV) > 0)
+ if(irand(0,RUNNING_CHANCE_RANDOMMV) > 0)
creature.AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
_setRandomLocation(creature);
}
@@ -192,9 +189,7 @@ RandomMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff
{
if(i_nextMoveTime.Passed())
{
- if (creature.canFly())
- creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
- else if(irand(0,RUNNING_CHANCE_RANDOMMV) > 0)
+ if(irand(0,RUNNING_CHANCE_RANDOMMV) > 0)
creature.AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
_setRandomLocation(creature);
}
diff --git a/src/game/TargetedMovementGenerator.cpp b/src/game/TargetedMovementGenerator.cpp
index c5ef0d5be87..46c18b1578f 100644
--- a/src/game/TargetedMovementGenerator.cpp
+++ b/src/game/TargetedMovementGenerator.cpp
@@ -144,8 +144,6 @@ TargetedMovementGenerator<T>::_setTargetLocation(T &owner)
*/
i_destinationHolder.SetDestination(traveller, x, y, z);
owner.addUnitState(UNIT_STAT_CHASE);
- if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
- owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
i_destinationHolder.StartTravel(traveller);
return true;
}
@@ -159,9 +157,6 @@ TargetedMovementGenerator<T>::Initialize(T &owner)
else
owner.RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
- if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
- owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
-
_setTargetLocation(owner);
}
@@ -211,9 +206,6 @@ TargetedMovementGenerator<T>::Update(T &owner, const uint32 & time_diff)
else if( owner.IsStopped() && !i_destinationHolder.HasArrived() )
{
owner.addUnitState(UNIT_STAT_CHASE);
- if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
- owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
-
i_destinationHolder.StartTravel(traveller);
return true;
}
diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp
index 92fd9bca2d7..8e5b8a501ff 100644
--- a/src/game/WaypointMovementGenerator.cpp
+++ b/src/game/WaypointMovementGenerator.cpp
@@ -85,9 +85,6 @@ void WaypointMovementGenerator<Creature>::InitTraveller(Creature &unit, const Wa
unit.SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
unit.SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
- if(unit.canFly())
- unit.AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
-
unit.addUnitState(UNIT_STAT_ROAMING);
}