Skip to content

Commit 05afc3a

Browse files
committed
Core/Movement: allow to manually set up SWIM flag on init splines
1 parent d1bbef9 commit 05afc3a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/server/game/Movement/Spline/MoveSplineFlag.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ namespace Movement
101101
void EnableFacingTarget() { raw() = (raw() & ~Mask_Final_Facing) | Final_Target; }
102102
void EnableTransportEnter() { raw() = (raw() & ~TransportExit) | TransportEnter; }
103103
void EnableTransportExit() { raw() = (raw() & ~TransportEnter) | TransportExit; }
104+
void EnableSwim() { raw() = raw() | CanSwim; }
104105

105106
uint8 animTier;
106107
bool done : 1;

src/server/game/Movement/Spline/MoveSplineInit.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ namespace Movement
144144
*/
145145
void SetVelocity(float velocity);
146146

147+
void SetSwim();
148+
147149
PointsArray& Path() { return args.path; }
148150

149151
/* Disables transport coordinate transformations for cases where raw offsets are available
@@ -164,6 +166,7 @@ namespace Movement
164166
inline void MoveSplineInit::SetTransportEnter() { args.flags.EnableTransportEnter(); }
165167
inline void MoveSplineInit::SetTransportExit() { args.flags.EnableTransportExit(); }
166168
inline void MoveSplineInit::SetOrientationFixed(bool enable) { args.flags.orientationFixed = enable; }
169+
inline void MoveSplineInit::SetSwim() { args.flags.EnableSwim(); }
167170

168171
inline void MoveSplineInit::SetParabolic(float amplitude, float time_shift)
169172
{

0 commit comments

Comments
 (0)