Core/Movement: Use spline id generator for movement packets

This commit is contained in:
Shauren
2013-04-07 16:02:27 +02:00
parent 3e32caa593
commit 199f8b7140
3 changed files with 3 additions and 0 deletions

View File

@@ -125,6 +125,7 @@ namespace Movement
MoveSplineInit::MoveSplineInit(Unit* m) : unit(m)
{
args.splineId = splineIdGen.NewId();
// Elevators also use MOVEMENTFLAG_ONTRANSPORT but we do not keep track of their position changes
args.TransformForTransport = unit->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && unit->GetTransGUID();
// mix existing state into new

View File

@@ -76,6 +76,7 @@ namespace Movement
extern double gravity;
extern float computeFallElevation(float t_passed, bool isSafeFall, float start_velocity);
extern UInt32Counter splineIdGen;
}
#endif // TRINITYSERVER_TYPEDEFS_H

View File

@@ -23,6 +23,7 @@
namespace Movement
{
double gravity = 19.29110527038574;
UInt32Counter splineIdGen;
/// Velocity bounds that makes fall speed limited
float terminalVelocity = 60.148003f;