mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Movement: Added functions to MoveSplineInit to enable steering flag
(cherry picked from commit cf4c3b5467)
This commit is contained in:
@@ -69,7 +69,7 @@ namespace Movement
|
||||
Mask_No_Monster_Move = Done,
|
||||
// Unused, not suported flags
|
||||
Mask_Unused = No_Spline | Enter_Cycle | Frozen | Unknown_0x8 | Unknown_0x100 | Unknown_0x20000 | Unknown_0x40000
|
||||
| Unknown_0x800000 | Unknown_0x1000000 | FadeObject | Steering | UnlimitedSpeed | Unknown_0x40000000 | Unknown_0x80000000
|
||||
| Unknown_0x800000 | Unknown_0x1000000 | FadeObject | UnlimitedSpeed | Unknown_0x40000000 | Unknown_0x80000000
|
||||
};
|
||||
|
||||
inline uint32& raw() { return (uint32&)*this; }
|
||||
@@ -101,6 +101,7 @@ namespace Movement
|
||||
void EnableCatmullRom() { raw() = (raw() & ~SmoothGroundPath) | Catmullrom; }
|
||||
void EnableTransportEnter() { raw() = (raw() & ~TransportExit) | TransportEnter; }
|
||||
void EnableTransportExit() { raw() = (raw() & ~TransportEnter) | TransportExit; }
|
||||
void EnableSteering() { raw() = (raw() & ~SmoothGroundPath) | Steering; }
|
||||
|
||||
bool unknown0x1 : 1;
|
||||
bool unknown0x2 : 1;
|
||||
|
||||
@@ -204,8 +204,8 @@ namespace Movement
|
||||
args.flags.canSwim = unit->CanSwim();
|
||||
args.walk = unit->HasUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
args.flags.flying = unit->HasUnitMovementFlag(MovementFlags(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_DISABLE_GRAVITY));
|
||||
args.flags.smoothGroundPath = true; // enabled by default, CatmullRom mode or client config "pathSmoothing" will disable this
|
||||
args.flags.steering = unit->HasNpcFlag2(UNIT_NPC_FLAG_2_STEERING);
|
||||
args.flags.smoothGroundPath = !args.flags.flying && !args.flags.steering; // enabled by default, CatmullRom mode or client config "pathSmoothing" will disable this
|
||||
}
|
||||
|
||||
MoveSplineInit::~MoveSplineInit() = default;
|
||||
|
||||
@@ -147,6 +147,10 @@ namespace Movement
|
||||
*/
|
||||
void SetOrientationFixed(bool enable);
|
||||
|
||||
/* Enables avoiding minor obstacles clientside (might cause visual position on client to not be accurate with the serverside one). Disabled by default
|
||||
*/
|
||||
void SetSteering();
|
||||
|
||||
/* Enables no-speed limit
|
||||
* if not set, the speed will be limited by certain flags to 50.0f, and otherwise 28.0f
|
||||
*/
|
||||
@@ -182,6 +186,7 @@ namespace Movement
|
||||
inline void MoveSplineInit::SetTransportEnter() { args.flags.EnableTransportEnter(); }
|
||||
inline void MoveSplineInit::SetTransportExit() { args.flags.EnableTransportExit(); }
|
||||
inline void MoveSplineInit::SetOrientationFixed(bool enable) { args.flags.orientationFixed = enable; }
|
||||
inline void MoveSplineInit::SetSteering() { args.flags.EnableSteering(); }
|
||||
inline void MoveSplineInit::SetUnlimitedSpeed() { args.flags.unlimitedSpeed = true; }
|
||||
|
||||
inline void MoveSplineInit::SetParabolic(float amplitude, float time_shift)
|
||||
|
||||
Reference in New Issue
Block a user