From 3b179a018ebec8534a682e9188eeceafd4e1f235 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sat, 17 Dec 2022 17:07:31 -0500 Subject: [PATCH] Core/Movement: Rename splineElevation in MovementInfo to stepUpStartElevation (official name) Port From (https://github.com/TrinityCore/TrinityCore/commit/8630a55c58a7555dd44cc20fee6252e323ed0408) --- Source/Game/Entities/Object/WorldObject.cs | 4 ++-- Source/Game/Entities/Player/Player.cs | 4 ++-- Source/Game/Networking/Packets/MovementPackets.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Game/Entities/Object/WorldObject.cs b/Source/Game/Entities/Object/WorldObject.cs index 23aff289f..e1188d076 100644 --- a/Source/Game/Entities/Object/WorldObject.cs +++ b/Source/Game/Entities/Object/WorldObject.cs @@ -292,7 +292,7 @@ namespace Game.Entities data.WriteFloat(unit.GetOrientation()); 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); // MoveIndex @@ -3744,7 +3744,7 @@ namespace Game.Entities public float Pitch { get; set; } public Inertia? inertia; public JumpInfo jump; - public float SplineElevation { get; set; } + public float stepUpStartElevation { get; set; } public MovementInfo() { diff --git a/Source/Game/Entities/Player/Player.cs b/Source/Game/Entities/Player/Player.cs index 964109c9b..633a22487 100644 --- a/Source/Game/Entities/Player/Player.cs +++ b/Source/Game/Entities/Player/Player.cs @@ -2013,10 +2013,10 @@ namespace Game.Entities RemoveViolatingFlags(mi.HasMovementFlag(MovementFlag.DisableGravity | MovementFlag.CanFly) && mi.HasMovementFlag(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 - if (MathFunctions.fuzzyNe(mi.SplineElevation, 0.0f)) + if (MathFunctions.fuzzyNe(mi.stepUpStartElevation, 0.0f)) mi.AddMovementFlag(MovementFlag.SplineElevation); } public void HandleFall(MovementInfo movementInfo) diff --git a/Source/Game/Networking/Packets/MovementPackets.cs b/Source/Game/Networking/Packets/MovementPackets.cs index 0924880b1..d26561c70 100644 --- a/Source/Game/Networking/Packets/MovementPackets.cs +++ b/Source/Game/Networking/Packets/MovementPackets.cs @@ -86,7 +86,7 @@ namespace Game.Networking.Packets movementInfo.Pos.Relocate(x, y, z, o); movementInfo.Pitch = data.ReadFloat(); - movementInfo.SplineElevation = data.ReadFloat(); + movementInfo.stepUpStartElevation = data.ReadFloat(); uint removeMovementForcesCount = data.ReadUInt32(); @@ -157,7 +157,7 @@ namespace Game.Networking.Packets data.WriteFloat(movementInfo.Pos.GetPositionZ()); data.WriteFloat(movementInfo.Pos.GetOrientation()); data.WriteFloat(movementInfo.Pitch); - data.WriteFloat(movementInfo.SplineElevation); + data.WriteFloat(movementInfo.stepUpStartElevation); uint removeMovementForcesCount = 0; data.WriteUInt32(removeMovementForcesCount);