mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Movement: Added more movement flags that cause units to select flight speed instead of run
This commit is contained in:
@@ -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*/)
|
||||
|
||||
Reference in New Issue
Block a user