aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Movement
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2013-01-14 13:58:34 +0000
committerNay <dnpd.dd@gmail.com>2013-01-14 13:58:34 +0000
commite6a07076c3b275c60598abd08e21444313e7a0da (patch)
tree34426a1d3db102089407a2e978e90299e1c71303 /src/server/game/Movement
parentb06c7e77858dcad0614c96f568126aee9966fa89 (diff)
parentc9ec5b4ce871bdeae446cbc86a4f88cee635ac53 (diff)
Merge remote-tracking branch 'origin/master' into mmaps
Conflicts: src/server/game/Entities/Unit/Unit.cpp src/server/game/Movement/MotionMaster.cpp src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp src/server/game/Movement/Spline/MoveSplineInit.cpp
Diffstat (limited to 'src/server/game/Movement')
-rw-r--r--src/server/game/Movement/MotionMaster.cpp12
-rw-r--r--src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp4
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.cpp6
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.h6
-rw-r--r--src/server/game/Movement/Spline/MoveSplineFlag.h2
-rw-r--r--src/server/game/Movement/Spline/MoveSplineInitArgs.h2
-rw-r--r--src/server/game/Movement/Spline/MovementPacketBuilder.cpp2
-rw-r--r--src/server/game/Movement/Spline/MovementUtil.cpp130
-rw-r--r--src/server/game/Movement/Spline/Spline.cpp8
-rw-r--r--src/server/game/Movement/Spline/Spline.h18
-rw-r--r--src/server/game/Movement/Spline/SplineImpl.h2
11 files changed, 96 insertions, 96 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 8bbbbc88eae..f792aa959fb 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -307,7 +307,7 @@ void MotionMaster::MoveLand(uint32 id, Position const& pos)
sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z);
Movement::MoveSplineInit init(_owner);
- init.MoveTo(x,y,z);
+ init.MoveTo(x, y, z);
init.SetAnimation(Movement::ToGround);
init.Launch();
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE);
@@ -321,7 +321,7 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos)
sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z);
Movement::MoveSplineInit init(_owner);
- init.MoveTo(x,y,z);
+ init.MoveTo(x, y, z);
init.SetAnimation(Movement::ToFly);
init.Launch();
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE);
@@ -336,13 +336,13 @@ void MotionMaster::MoveKnockbackFrom(float srcX, float srcY, float speedXY, floa
float x, y, z;
float moveTimeHalf = speedZ / Movement::gravity;
float dist = 2 * moveTimeHalf * speedXY;
- float max_height = -Movement::computeFallElevation(moveTimeHalf,false,-speedZ);
+ float max_height = -Movement::computeFallElevation(moveTimeHalf, false, -speedZ);
_owner->GetNearPoint(_owner, x, y, z, _owner->GetObjectSize(), dist, _owner->GetAngle(srcX, srcY) + M_PI);
Movement::MoveSplineInit init(_owner);
init.MoveTo(x, y, z);
- init.SetParabolic(max_height,0);
+ init.SetParabolic(max_height, 0);
init.SetOrientationFixed(true);
init.SetVelocity(speedXY);
init.Launch();
@@ -368,11 +368,11 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
sLog->outDebug(LOG_FILTER_GENERAL, "Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z);
float moveTimeHalf = speedZ / Movement::gravity;
- float max_height = -Movement::computeFallElevation(moveTimeHalf,false,-speedZ);
+ float max_height = -Movement::computeFallElevation(moveTimeHalf, false, -speedZ);
Movement::MoveSplineInit init(_owner);
init.MoveTo(x, y, z, false);
- init.SetParabolic(max_height,0);
+ init.SetParabolic(max_height, 0);
init.SetVelocity(speedXY);
init.Launch();
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
index 74bb79f75e4..723b0748494 100644
--- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
@@ -165,8 +165,8 @@ bool RandomMovementGenerator<Creature>::GetResetPos(Creature* creature, float& x
creature->GetRespawnPosition(x, y, z, NULL, &radius);
// use current if in range
- if (creature->IsWithinDist2d(x,y,radius))
- creature->GetPosition(x,y,z);
+ if (creature->IsWithinDist2d(x, y, radius))
+ creature->GetPosition(x, y, z);
return true;
}
diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp
index 1e96cd00fd3..f6b1c07a927 100644
--- a/src/server/game/Movement/Spline/MoveSpline.cpp
+++ b/src/server/game/Movement/Spline/MoveSpline.cpp
@@ -32,7 +32,7 @@ Location MoveSpline::ComputePosition() const
ASSERT(Initialized());
float u = 1.f;
- int32 seg_time = spline.length(point_Idx,point_Idx+1);
+ int32 seg_time = spline.length(point_Idx, point_Idx+1);
if (seg_time > 0)
u = (time_passed - spline.length(point_Idx)) / (float)seg_time;
Location c;
@@ -103,7 +103,7 @@ struct FallInitializer
float start_elevation;
inline int32 operator()(Spline<int32>& s, int32 i)
{
- return Movement::computeFallTime(start_elevation - s.getPoint(i+1).z,false) * 1000.f;
+ return Movement::computeFallTime(start_elevation - s.getPoint(i+1).z, false) * 1000.f;
}
};
@@ -125,7 +125,7 @@ struct CommonInitializer
void MoveSpline::init_spline(const MoveSplineInitArgs& args)
{
- const SplineBase::EvaluationMode modes[2] = {SplineBase::ModeLinear,SplineBase::ModeCatmullrom};
+ const SplineBase::EvaluationMode modes[2] = {SplineBase::ModeLinear, SplineBase::ModeCatmullrom};
if (args.flags.cyclic)
{
uint32 cyclic_point = 0;
diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h
index 938466cd475..b18166ea615 100644
--- a/src/server/game/Movement/Spline/MoveSpline.h
+++ b/src/server/game/Movement/Spline/MoveSpline.h
@@ -27,7 +27,7 @@ namespace Movement
struct Location : public Vector3
{
Location() : orientation(0) {}
- Location(float x, float y, float z, float o) : Vector3(x,y,z), orientation(o) {}
+ Location(float x, float y, float z, float o) : Vector3(x, y, z), orientation(o) {}
Location(const Vector3& v) : Vector3(v), orientation(0) {}
Location(const Vector3& v, float o) : Vector3(v), orientation(o) {}
@@ -100,14 +100,14 @@ namespace Movement
ASSERT(Initialized());
do
handler(_updateState(difftime));
- while(difftime > 0);
+ while (difftime > 0);
}
void updateState(int32 difftime)
{
ASSERT(Initialized());
do _updateState(difftime);
- while(difftime > 0);
+ while (difftime > 0);
}
Location ComputePosition() const;
diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h
index f3f436c9d00..ec7eaf7e763 100644
--- a/src/server/game/Movement/Spline/MoveSplineFlag.h
+++ b/src/server/game/Movement/Spline/MoveSplineFlag.h
@@ -27,7 +27,7 @@ namespace Movement
#if defined( __GNUC__ )
#pragma pack(1)
#else
-#pragma pack(push,1)
+#pragma pack(push, 1)
#endif
class MoveSplineFlag
diff --git a/src/server/game/Movement/Spline/MoveSplineInitArgs.h b/src/server/game/Movement/Spline/MoveSplineInitArgs.h
index 32045629c9f..4a086094c3f 100644
--- a/src/server/game/Movement/Spline/MoveSplineInitArgs.h
+++ b/src/server/game/Movement/Spline/MoveSplineInitArgs.h
@@ -31,7 +31,7 @@ namespace Movement
union FacingInfo
{
struct{
- float x,y,z;
+ float x, y, z;
}f;
uint64 target;
float angle;
diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp
index d747d6f69a6..7133fc50e9f 100644
--- a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp
+++ b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp
@@ -141,7 +141,7 @@ namespace Movement
void PacketBuilder::WriteCreate(const MoveSpline& move_spline, ByteBuffer& data)
{
- //WriteClientStatus(mov,data);
+ //WriteClientStatus(mov, data);
//data.append<float>(&mov.m_float_values[SpeedWalk], SpeedMaxCount);
//if (mov.SplineEnabled())
{
diff --git a/src/server/game/Movement/Spline/MovementUtil.cpp b/src/server/game/Movement/Spline/MovementUtil.cpp
index b69d4b39e19..99413384dd8 100644
--- a/src/server/game/Movement/Spline/MovementUtil.cpp
+++ b/src/server/game/Movement/Spline/MovementUtil.cpp
@@ -103,39 +103,39 @@ namespace Movement
char const* g_MovementFlag_names[] =
{
- STR(Forward ),// 0x00000001,
- STR(Backward ),// 0x00000002,
- STR(Strafe_Left ),// 0x00000004,
- STR(Strafe_Right ),// 0x00000008,
- STR(Turn_Left ),// 0x00000010,
- STR(Turn_Right ),// 0x00000020,
- STR(Pitch_Up ),// 0x00000040,
- STR(Pitch_Down ),// 0x00000080,
-
- STR(Walk ),// 0x00000100, // Walking
- STR(Ontransport ),// 0x00000200,
- STR(Levitation ),// 0x00000400,
- STR(Root ),// 0x00000800,
- STR(Falling ),// 0x00001000,
- STR(Fallingfar ),// 0x00002000,
- STR(Pendingstop ),// 0x00004000,
- STR(PendingSTRafestop ),// 0x00008000,
- STR(Pendingforward ),// 0x00010000,
- STR(Pendingbackward ),// 0x00020000,
- STR(PendingSTRafeleft ),// 0x00040000,
- STR(PendingSTRaferight ),// 0x00080000,
- STR(Pendingroot ),// 0x00100000,
- STR(Swimming ),// 0x00200000, // Appears With Fly Flag Also
- STR(Ascending ),// 0x00400000, // Swim Up Also
- STR(Descending ),// 0x00800000, // Swim Down Also
- STR(Can_Fly ),// 0x01000000, // Can Fly In 3.3?
- STR(Flying ),// 0x02000000, // Actual Flying Mode
- STR(Spline_Elevation ),// 0x04000000, // Used For Flight Paths
- STR(Spline_Enabled ),// 0x08000000, // Used For Flight Paths
- STR(Waterwalking ),// 0x10000000, // Prevent Unit From Falling Through Water
- STR(Safe_Fall ),// 0x20000000, // Active Rogue Safe Fall Spell (Passive)
- STR(Hover ),// 0x40000000
- STR(Unknown13 ),// 0x80000000
+ STR(Forward ), // 0x00000001,
+ STR(Backward ), // 0x00000002,
+ STR(Strafe_Left ), // 0x00000004,
+ STR(Strafe_Right ), // 0x00000008,
+ STR(Turn_Left ), // 0x00000010,
+ STR(Turn_Right ), // 0x00000020,
+ STR(Pitch_Up ), // 0x00000040,
+ STR(Pitch_Down ), // 0x00000080,
+
+ STR(Walk ), // 0x00000100, // Walking
+ STR(Ontransport ), // 0x00000200,
+ STR(Levitation ), // 0x00000400,
+ STR(Root ), // 0x00000800,
+ STR(Falling ), // 0x00001000,
+ STR(Fallingfar ), // 0x00002000,
+ STR(Pendingstop ), // 0x00004000,
+ STR(PendingSTRafestop ), // 0x00008000,
+ STR(Pendingforward ), // 0x00010000,
+ STR(Pendingbackward ), // 0x00020000,
+ STR(PendingSTRafeleft ), // 0x00040000,
+ STR(PendingSTRaferight ), // 0x00080000,
+ STR(Pendingroot ), // 0x00100000,
+ STR(Swimming ), // 0x00200000, // Appears With Fly Flag Also
+ STR(Ascending ), // 0x00400000, // Swim Up Also
+ STR(Descending ), // 0x00800000, // Swim Down Also
+ STR(Can_Fly ), // 0x01000000, // Can Fly In 3.3?
+ STR(Flying ), // 0x02000000, // Actual Flying Mode
+ STR(Spline_Elevation ), // 0x04000000, // Used For Flight Paths
+ STR(Spline_Enabled ), // 0x08000000, // Used For Flight Paths
+ STR(Waterwalking ), // 0x10000000, // Prevent Unit From Falling Through Water
+ STR(Safe_Fall ), // 0x20000000, // Active Rogue Safe Fall Spell (Passive)
+ STR(Hover ), // 0x40000000
+ STR(Unknown13 ), // 0x80000000
STR(Unk1 ),
STR(Unk2 ),
STR(Unk3 ),
@@ -156,38 +156,38 @@ namespace Movement
char const* g_SplineFlag_names[32] =
{
- STR(AnimBit1 ),// 0x00000001,
- STR(AnimBit2 ),// 0x00000002,
- STR(AnimBit3 ),// 0x00000004,
- STR(AnimBit4 ),// 0x00000008,
- STR(AnimBit5 ),// 0x00000010,
- STR(AnimBit6 ),// 0x00000020,
- STR(AnimBit7 ),// 0x00000040,
- STR(AnimBit8 ),// 0x00000080,
- STR(Done ),// 0x00000100,
- STR(Falling ),// 0x00000200, // Not Compartible With Trajectory Movement
- STR(No_Spline ),// 0x00000400,
- STR(Trajectory ),// 0x00000800, // Not Compartible With Fall Movement
- STR(Walkmode ),// 0x00001000,
- STR(Flying ),// 0x00002000, // Smooth Movement(Catmullrom Interpolation Mode), Flying Animation
- STR(Knockback ),// 0x00004000, // Model Orientation Fixed
- STR(Final_Point ),// 0x00008000,
- STR(Final_Target ),// 0x00010000,
- STR(Final_Angle ),// 0x00020000,
- STR(Catmullrom ),// 0x00040000, // Used Catmullrom Interpolation Mode
- STR(Cyclic ),// 0x00080000, // Movement By Cycled Spline
- STR(Enter_Cycle ),// 0x00100000, // Everytime Appears With Cyclic Flag In Monster Move Packet
- STR(Animation ),// 0x00200000, // Animationid (0...3), Uint32 Time, Not Compartible With Trajectory And Fall Movement
- STR(Unknown4 ),// 0x00400000, // Disables Movement By Path
- STR(Unknown5 ),// 0x00800000,
- STR(Unknown6 ),// 0x01000000,
- STR(Unknown7 ),// 0x02000000,
- STR(Unknown8 ),// 0x04000000,
- STR(OrientationInversed ),// 0x08000000, // Appears With Runmode Flag, Nodes ),// 1, Handles Orientation
- STR(Unknown10 ),// 0x10000000,
- STR(Unknown11 ),// 0x20000000,
- STR(Unknown12 ),// 0x40000000,
- STR(Unknown13 ),// 0x80000000,
+ STR(AnimBit1 ), // 0x00000001,
+ STR(AnimBit2 ), // 0x00000002,
+ STR(AnimBit3 ), // 0x00000004,
+ STR(AnimBit4 ), // 0x00000008,
+ STR(AnimBit5 ), // 0x00000010,
+ STR(AnimBit6 ), // 0x00000020,
+ STR(AnimBit7 ), // 0x00000040,
+ STR(AnimBit8 ), // 0x00000080,
+ STR(Done ), // 0x00000100,
+ STR(Falling ), // 0x00000200, // Not Compartible With Trajectory Movement
+ STR(No_Spline ), // 0x00000400,
+ STR(Trajectory ), // 0x00000800, // Not Compartible With Fall Movement
+ STR(Walkmode ), // 0x00001000,
+ STR(Flying ), // 0x00002000, // Smooth Movement(Catmullrom Interpolation Mode), Flying Animation
+ STR(Knockback ), // 0x00004000, // Model Orientation Fixed
+ STR(Final_Point ), // 0x00008000,
+ STR(Final_Target ), // 0x00010000,
+ STR(Final_Angle ), // 0x00020000,
+ STR(Catmullrom ), // 0x00040000, // Used Catmullrom Interpolation Mode
+ STR(Cyclic ), // 0x00080000, // Movement By Cycled Spline
+ STR(Enter_Cycle ), // 0x00100000, // Everytime Appears With Cyclic Flag In Monster Move Packet
+ STR(Animation ), // 0x00200000, // Animationid (0...3), Uint32 Time, Not Compartible With Trajectory And Fall Movement
+ STR(Unknown4 ), // 0x00400000, // Disables Movement By Path
+ STR(Unknown5 ), // 0x00800000,
+ STR(Unknown6 ), // 0x01000000,
+ STR(Unknown7 ), // 0x02000000,
+ STR(Unknown8 ), // 0x04000000,
+ STR(OrientationInversed ), // 0x08000000, // Appears With Runmode Flag, Nodes ), // 1, Handles Orientation
+ STR(Unknown10 ), // 0x10000000,
+ STR(Unknown11 ), // 0x20000000,
+ STR(Unknown12 ), // 0x40000000,
+ STR(Unknown13 ), // 0x80000000,
};
template<class Flags, int N>
diff --git a/src/server/game/Movement/Spline/Spline.cpp b/src/server/game/Movement/Spline/Spline.cpp
index 6970acf5415..887541e2289 100644
--- a/src/server/game/Movement/Spline/Spline.cpp
+++ b/src/server/game/Movement/Spline/Spline.cpp
@@ -59,7 +59,7 @@ SplineBase::InitMethtod SplineBase::initializers[SplineBase::ModesEnd] =
using G3D::Matrix4;
static const Matrix4 s_catmullRomCoeffs(
- -0.5f, 1.5f,-1.5f, 0.5f,
+ -0.5f, 1.5f, -1.5f, 0.5f,
1.f, -2.5f, 2.f, -0.5f,
-0.5f, 0.f, 0.5f, 0.f,
0.f, 1.f, 0.f, 0.f);
@@ -222,7 +222,7 @@ void SplineBase::InitLinear(const Vector3* controls, index_type count, bool cycl
points.resize(real_size);
- memcpy(&points[0],controls, sizeof(Vector3) * count);
+ memcpy(&points[0], controls, sizeof(Vector3) * count);
// first and last two indexes are space for special 'virtual points'
// these points are required for proper C_Evaluate and C_Evaluate_Derivative methtod work
@@ -244,7 +244,7 @@ void SplineBase::InitCatmullRom(const Vector3* controls, index_type count, bool
int lo_index = 1;
int high_index = lo_index + count - 1;
- memcpy(&points[lo_index],controls, sizeof(Vector3) * count);
+ memcpy(&points[lo_index], controls, sizeof(Vector3) * count);
// first and last two indexes are space for special 'virtual points'
// these points are required for proper C_Evaluate and C_Evaluate_Derivative methtod work
@@ -274,7 +274,7 @@ void SplineBase::InitBezier3(const Vector3* controls, index_type count, bool /*c
index_type t = c / 3u;
points.resize(c);
- memcpy(&points[0],controls, sizeof(Vector3) * c);
+ memcpy(&points[0], controls, sizeof(Vector3) * c);
index_lo = 0;
index_hi = t-1;
diff --git a/src/server/game/Movement/Spline/Spline.h b/src/server/game/Movement/Spline/Spline.h
index 63e61b84579..2a2f3fa8f43 100644
--- a/src/server/game/Movement/Spline/Spline.h
+++ b/src/server/game/Movement/Spline/Spline.h
@@ -61,7 +61,7 @@ protected:
void EvaluateLinear(index_type, float, Vector3&) const;
void EvaluateCatmullRom(index_type, float, Vector3&) const;
void EvaluateBezier3(index_type, float, Vector3&) const;
- typedef void (SplineBase::*EvaluationMethtod)(index_type,float,Vector3&) const;
+ typedef void (SplineBase::*EvaluationMethtod)(index_type, float, Vector3&) const;
static EvaluationMethtod evaluators[ModesEnd];
void EvaluateDerivativeLinear(index_type, float, Vector3&) const;
@@ -91,13 +91,13 @@ public:
@param t - percent of segment length, assumes that t in range [0, 1]
@param Idx - spline segment index, should be in range [first, last)
*/
- void evaluate_percent(index_type Idx, float u, Vector3& c) const {(this->*evaluators[m_mode])(Idx,u,c);}
+ void evaluate_percent(index_type Idx, float u, Vector3& c) const {(this->*evaluators[m_mode])(Idx, u,c);}
/** Caclulates derivation in index Idx, and percent of segment length t
@param Idx - spline segment index, should be in range [first, last)
@param t - percent of spline segment length, assumes that t in range [0, 1]
*/
- void evaluate_derivative(index_type Idx, float u, Vector3& hermite) const {(this->*derivative_evaluators[m_mode])(Idx,u,hermite);}
+ void evaluate_derivative(index_type Idx, float u, Vector3& hermite) const {(this->*derivative_evaluators[m_mode])(Idx, u,hermite);}
/** Bounds for spline indexes. All indexes should be in range [first, last). */
index_type first() const { return index_lo;}
@@ -119,7 +119,7 @@ public:
would be no harm to have some custom initializers. */
template<class Init> inline void init_spline(Init& initializer)
{
- initializer(m_mode,cyclic,points,index_lo,index_hi);
+ initializer(m_mode, cyclic, points, index_lo, index_hi);
}
void clear();
@@ -156,20 +156,20 @@ public:
/** Calculates the position for given segment Idx, and percent of segment length t
@param t = partial_segment_length / whole_segment_length
@param Idx - spline segment index, should be in range [first, last). */
- void evaluate_percent(index_type Idx, float u, Vector3& c) const { SplineBase::evaluate_percent(Idx,u,c);}
+ void evaluate_percent(index_type Idx, float u, Vector3& c) const { SplineBase::evaluate_percent(Idx, u,c);}
/** Caclulates derivation for index Idx, and percent of segment length t
@param Idx - spline segment index, should be in range [first, last)
@param t - percent of spline segment length, assumes that t in range [0, 1]. */
- void evaluate_derivative(index_type Idx, float u, Vector3& c) const { SplineBase::evaluate_derivative(Idx,u,c);}
+ void evaluate_derivative(index_type Idx, float u, Vector3& c) const { SplineBase::evaluate_derivative(Idx, u,c);}
// Assumes that t in range [0, 1]
index_type computeIndexInBounds(float t) const;
void computeIndex(float t, index_type& out_idx, float& out_u) const;
/** Initializes spline. Don't call other methods while spline not initialized. */
- void init_spline(const Vector3 * controls, index_type count, EvaluationMode m) { SplineBase::init_spline(controls,count,m);}
- void init_cyclic_spline(const Vector3 * controls, index_type count, EvaluationMode m, index_type cyclic_point) { SplineBase::init_cyclic_spline(controls,count,m,cyclic_point);}
+ void init_spline(const Vector3 * controls, index_type count, EvaluationMode m) { SplineBase::init_spline(controls, count, m);}
+ void init_cyclic_spline(const Vector3 * controls, index_type count, EvaluationMode m, index_type cyclic_point) { SplineBase::init_cyclic_spline(controls, count, m,cyclic_point);}
/** Initializes lengths with SplineBase::SegLength method. */
void initLengths();
@@ -181,7 +181,7 @@ public:
index_type i = index_lo;
lengths.resize(index_hi+1);
length_type prev_length = 0, new_length = 0;
- while(i < index_hi)
+ while (i < index_hi)
{
new_length = cacher(*this, i);
lengths[++i] = new_length;
diff --git a/src/server/game/Movement/Spline/SplineImpl.h b/src/server/game/Movement/Spline/SplineImpl.h
index eded2d8c903..98f3f5fe079 100644
--- a/src/server/game/Movement/Spline/SplineImpl.h
+++ b/src/server/game/Movement/Spline/SplineImpl.h
@@ -81,7 +81,7 @@ template<typename length_type> void Spline<length_type>::initLengths()
index_type i = index_lo;
length_type length = 0;
lengths.resize(index_hi+1);
- while(i < index_hi )
+ while (i < index_hi)
{
length += SegLength(i);
lengths[++i] = length;