Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…light speed instead of run
  • Loading branch information...
commit 313802a4ede4659cfa5b433bcfd4d30de504be80 1 parent 4a96ae2
@Shauren Shauren authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/server/game/Movement/Spline/MoveSplineInit.cpp
View
10 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*/)
Please sign in to comment.
Something went wrong with that request. Please try again.