Skip to content

Instantly share code, notes, and snippets.

@SilverIce
Created September 14, 2011 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SilverIce/1216633 to your computer and use it in GitHub Desktop.
Save SilverIce/1216633 to your computer and use it in GitHub Desktop.
diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp
index b5743f7..8d0a282 100644
--- a/src/game/WaypointMovementGenerator.cpp
+++ b/src/game/WaypointMovementGenerator.cpp
@@ -75,31 +75,30 @@ void WaypointMovementGenerator<Creature>::LoadPath(Creature &creature)
return;
}
}
-
- StartMoveNow(creature);
}
void WaypointMovementGenerator<Creature>::Initialize(Creature &creature)
{
LoadPath(creature);
- creature.addUnitState(UNIT_STAT_ROAMING|UNIT_STAT_ROAMING_MOVE);
+ Reset(creature);
}
void WaypointMovementGenerator<Creature>::Finalize(Creature &creature)
{
creature.clearUnitState(UNIT_STAT_ROAMING|UNIT_STAT_ROAMING_MOVE);
- creature.SetWalk(false);
+ //creature.SetWalk(false); really required?
}
void WaypointMovementGenerator<Creature>::Interrupt(Creature &creature)
{
creature.clearUnitState(UNIT_STAT_ROAMING|UNIT_STAT_ROAMING_MOVE);
- creature.SetWalk(false);
+ //creature.SetWalk(false); really required?
}
void WaypointMovementGenerator<Creature>::Reset(Creature &creature)
{
creature.addUnitState(UNIT_STAT_ROAMING|UNIT_STAT_ROAMING_MOVE);
+ creature.SetWalk(true);
StartMoveNow(creature);
}
@@ -185,7 +184,6 @@ void WaypointMovementGenerator<Creature>::StartMove(Creature &creature)
if (node.orientation != 100 && node.delay != 0)
init.SetFacing(node.orientation);
- init.SetWalk(!creature.IsLevitating());
init.Launch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment