[12217] Allow SplineMovement flags for vehicles

First author to use the spline movement in vehicle patches unknown, likely names are zergtmn or rsa

Signed-off-by: Schmoozerd <schmoozerd@cmangos>
This commit is contained in:
kid10 2012-09-13 22:45:25 +02:00 committed by Antz
parent ef0f63e05b
commit 45d0e5babe
3 changed files with 17 additions and 7 deletions

View file

@ -49,8 +49,8 @@ namespace Movement
Cyclic = 0x00001000, // Movement by cycled spline
Enter_Cycle = 0x00002000, // Everytimes appears with cyclic flag in monster move packet, erases first spline vertex after first cycle done
Frozen = 0x00004000, // Will never arrive
TransportEnter = 0x00008000,
TransportExit = 0x00010000,
BoardVehicle = 0x00008000,
ExitVehicle = 0x00010000,
Unknown3 = 0x00020000, // NOT VERIFIED
Unknown4 = 0x00040000, // NOT VERIFIED
OrientationInversed = 0x00080000,
@ -109,8 +109,8 @@ namespace Movement
void EnableFacingPoint() { raw() = (raw() & ~Mask_Final_Facing) | Final_Point;}
void EnableFacingAngle() { raw() = (raw() & ~Mask_Final_Facing) | Final_Angle;}
void EnableFacingTarget() { raw() = (raw() & ~Mask_Final_Facing) | Final_Target;}
void EnableTransportEnter() { raw() = (raw() & ~TransportExit) | TransportEnter; }
void EnableTransportExit() { raw() = (raw() & ~TransportEnter) | TransportExit; }
void EnableBoardVehicle() { raw() = (raw() & ~(Catmullrom | ExitVehicle)) | BoardVehicle; }
void EnableExitVehicle() { raw() = (raw() & ~BoardVehicle) | ExitVehicle; }
uint8 animId : 3;
bool unknown0 : 1;
@ -125,8 +125,8 @@ namespace Movement
bool cyclic : 1;
bool enter_cycle : 1;
bool frozen : 1;
bool transportEnter : 1;
bool transportExit : 1;
bool boardVehicle : 1;
bool exitVehicle : 1;
bool unknown3 : 1;
bool unknown4 : 1;
bool orientationInversed : 1;

View file

@ -112,6 +112,14 @@ namespace Movement
*/
void SetVelocity(float velocity);
/* Sets BoardVehicle flag
*/
void SetBoardVehicle();
/* Sets ExitVehicle flag
*/
void SetExitVehicle();
PointsArray& Path() { return args.path; }
protected:
@ -128,6 +136,8 @@ namespace Movement
inline void MoveSplineInit::SetVelocity(float vel) { args.velocity = vel;}
inline void MoveSplineInit::SetOrientationInversed() { args.flags.orientationInversed = true;}
inline void MoveSplineInit::SetOrientationFixed(bool enable) { args.flags.orientationFixed = enable;}
inline void MoveSplineInit::SetBoardVehicle() { args.flags.EnableBoardVehicle(); }
inline void MoveSplineInit::SetExitVehicle() { args.flags.EnableExitVehicle(); }
inline void MoveSplineInit::MovebyPath(const PointsArray& controls, int32 path_offset)
{

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12216"
#define REVISION_NR "12217"
#endif // __REVISION_NR_H__