*Remove some unused code in movement generator.
--HG-- branch : trunk
This commit is contained in:
1 parent
f13b3f4e58
commit
227471fe18
4 files changed
+2
-21
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user