Core/Movement: Rename splineElevation in MovementInfo to stepUpStartElevation (official name)
Port From (https://github.com/TrinityCore/TrinityCore/commit/8630a55c58a7555dd44cc20fee6252e323ed0408)
This commit is contained in:
@@ -292,7 +292,7 @@ namespace Game.Entities
|
|||||||
data.WriteFloat(unit.GetOrientation());
|
data.WriteFloat(unit.GetOrientation());
|
||||||
|
|
||||||
data.WriteFloat(unit.m_movementInfo.Pitch); // Pitch
|
data.WriteFloat(unit.m_movementInfo.Pitch); // Pitch
|
||||||
data.WriteFloat(unit.m_movementInfo.SplineElevation); // StepUpStartElevation
|
data.WriteFloat(unit.m_movementInfo.stepUpStartElevation); // StepUpStartElevation
|
||||||
|
|
||||||
data.WriteUInt32(0); // RemoveForcesIDs.size()
|
data.WriteUInt32(0); // RemoveForcesIDs.size()
|
||||||
data.WriteUInt32(0); // MoveIndex
|
data.WriteUInt32(0); // MoveIndex
|
||||||
@@ -3744,7 +3744,7 @@ namespace Game.Entities
|
|||||||
public float Pitch { get; set; }
|
public float Pitch { get; set; }
|
||||||
public Inertia? inertia;
|
public Inertia? inertia;
|
||||||
public JumpInfo jump;
|
public JumpInfo jump;
|
||||||
public float SplineElevation { get; set; }
|
public float stepUpStartElevation { get; set; }
|
||||||
|
|
||||||
public MovementInfo()
|
public MovementInfo()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2013,10 +2013,10 @@ namespace Game.Entities
|
|||||||
RemoveViolatingFlags(mi.HasMovementFlag(MovementFlag.DisableGravity | MovementFlag.CanFly) && mi.HasMovementFlag(MovementFlag.Falling),
|
RemoveViolatingFlags(mi.HasMovementFlag(MovementFlag.DisableGravity | MovementFlag.CanFly) && mi.HasMovementFlag(MovementFlag.Falling),
|
||||||
MovementFlag.Falling);
|
MovementFlag.Falling);
|
||||||
|
|
||||||
RemoveViolatingFlags(mi.HasMovementFlag(MovementFlag.SplineElevation) && MathFunctions.fuzzyEq(mi.SplineElevation, 0.0f), MovementFlag.SplineElevation);
|
RemoveViolatingFlags(mi.HasMovementFlag(MovementFlag.SplineElevation) && MathFunctions.fuzzyEq(mi.stepUpStartElevation, 0.0f), MovementFlag.SplineElevation);
|
||||||
|
|
||||||
// Client first checks if spline elevation != 0, then verifies flag presence
|
// Client first checks if spline elevation != 0, then verifies flag presence
|
||||||
if (MathFunctions.fuzzyNe(mi.SplineElevation, 0.0f))
|
if (MathFunctions.fuzzyNe(mi.stepUpStartElevation, 0.0f))
|
||||||
mi.AddMovementFlag(MovementFlag.SplineElevation);
|
mi.AddMovementFlag(MovementFlag.SplineElevation);
|
||||||
}
|
}
|
||||||
public void HandleFall(MovementInfo movementInfo)
|
public void HandleFall(MovementInfo movementInfo)
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ namespace Game.Networking.Packets
|
|||||||
|
|
||||||
movementInfo.Pos.Relocate(x, y, z, o);
|
movementInfo.Pos.Relocate(x, y, z, o);
|
||||||
movementInfo.Pitch = data.ReadFloat();
|
movementInfo.Pitch = data.ReadFloat();
|
||||||
movementInfo.SplineElevation = data.ReadFloat();
|
movementInfo.stepUpStartElevation = data.ReadFloat();
|
||||||
|
|
||||||
uint removeMovementForcesCount = data.ReadUInt32();
|
uint removeMovementForcesCount = data.ReadUInt32();
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ namespace Game.Networking.Packets
|
|||||||
data.WriteFloat(movementInfo.Pos.GetPositionZ());
|
data.WriteFloat(movementInfo.Pos.GetPositionZ());
|
||||||
data.WriteFloat(movementInfo.Pos.GetOrientation());
|
data.WriteFloat(movementInfo.Pos.GetOrientation());
|
||||||
data.WriteFloat(movementInfo.Pitch);
|
data.WriteFloat(movementInfo.Pitch);
|
||||||
data.WriteFloat(movementInfo.SplineElevation);
|
data.WriteFloat(movementInfo.stepUpStartElevation);
|
||||||
|
|
||||||
uint removeMovementForcesCount = 0;
|
uint removeMovementForcesCount = 0;
|
||||||
data.WriteUInt32(removeMovementForcesCount);
|
data.WriteUInt32(removeMovementForcesCount);
|
||||||
|
|||||||
Reference in New Issue
Block a user