Permalink
Browse files

Core/Movement: Added more movement flags that cause units to select f…

…light speed instead of run
  • Loading branch information...
1 parent 4a96ae2 commit 313802a4ede4659cfa5b433bcfd4d30de504be80 @Shauren Shauren committed Mar 15, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/server/game/Movement/Spline/MoveSplineInit.cpp
@@ -25,9 +25,13 @@ namespace Movement
{
UnitMoveType SelectSpeedType(uint32 moveFlags)
{
- if (moveFlags & MOVEMENTFLAG_FLYING)
+ /*! Not sure about MOVEMENTFLAG_CAN_FLY here - do creatures that can fly
+ but are on ground right now also have it? If yes, this needs a more
+ dynamic check, such as is flying now
+ */
+ if (moveFlags & (MOVEMENTFLAG_FLYING | MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_DISABLE_GRAVITY))
{
- if ( moveFlags & MOVEMENTFLAG_BACKWARD /*&& speed_obj.flight >= speed_obj.flight_back*/ )
+ if (moveFlags & MOVEMENTFLAG_BACKWARD /*&& speed_obj.flight >= speed_obj.flight_back*/)
return MOVE_FLIGHT_BACK;
else
return MOVE_FLIGHT;
@@ -41,7 +45,7 @@ namespace Movement
}
else if (moveFlags & MOVEMENTFLAG_WALKING)
{
- //if ( speed_obj.run > speed_obj.walk )
+ //if (speed_obj.run > speed_obj.walk)
return MOVE_WALK;
}
else if (moveFlags & MOVEMENTFLAG_BACKWARD /*&& speed_obj.run >= speed_obj.run_back*/)

0 comments on commit 313802a

Please sign in to comment.