aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-09-18 16:22:08 +0200
committerShauren <shauren.trinity@gmail.com>2015-09-18 16:22:08 +0200
commit10b068ce5dbf9da7be6a727e0cdb0360f5c4b615 (patch)
tree21d8a33ae1db2c9da015ad369e3a41e327ecf0e7
parent93875c523cfef74a9694350e984bb94bee94f422 (diff)
Core/PacketIO: Fixed SMSG_ON_MONSTER_MOVE structure for uncompressed path
-rw-r--r--src/server/game/Server/Packets/MovementPackets.cpp10
-rw-r--r--src/server/game/Server/Packets/MovementPackets.h4
2 files changed, 6 insertions, 8 deletions
diff --git a/src/server/game/Server/Packets/MovementPackets.cpp b/src/server/game/Server/Packets/MovementPackets.cpp
index c8c26af2be2..cd6f1334682 100644
--- a/src/server/game/Server/Packets/MovementPackets.cpp
+++ b/src/server/game/Server/Packets/MovementPackets.cpp
@@ -395,15 +395,15 @@ void WorldPackets::Movement::MonsterMove::InitializeSplineData(::Movement::MoveS
if (!splineFlags.cyclic)
{
uint32 count = spline.getPointCount() - 3;
- for (uint32 i = 2; i < count; ++i)
- movementSpline.Points.push_back(array[i]);
+ for (uint32 i = 0; i < count; ++i)
+ movementSpline.Points.push_back(array[i + 2]);
}
else
{
uint32 count = spline.getPointCount() - 3;
movementSpline.Points.push_back(array[1]);
- for (uint32 i = 1; i < count; ++i)
- movementSpline.Points.push_back(array[i]);
+ for (uint32 i = 0; i < count; ++i)
+ movementSpline.Points.push_back(array[i + 1]);
}
}
else
@@ -422,8 +422,6 @@ void WorldPackets::Movement::MonsterMove::InitializeSplineData(::Movement::MoveS
movementSpline.PackedDeltas.push_back(middle - realPath[i]);
}
}
-
- movementSpline.Mode = spline.mode();
}
WorldPacket const* WorldPackets::Movement::MonsterMove::Write()
diff --git a/src/server/game/Server/Packets/MovementPackets.h b/src/server/game/Server/Packets/MovementPackets.h
index b00d29f5501..011a74b07e0 100644
--- a/src/server/game/Server/Packets/MovementPackets.h
+++ b/src/server/game/Server/Packets/MovementPackets.h
@@ -78,8 +78,8 @@ namespace WorldPackets
uint32 MoveTime = 0;
float JumpGravity = 0.0f;
uint32 SpecialTime = 0;
- std::vector<G3D::Vector3> Points; // Spline path
- uint8 Mode = 0;
+ std::vector<G3D::Vector3> Points; // Spline path
+ uint8 Mode = 0; // Spline mode - actually always 0 in this packet - Catmullrom mode appears only in SMSG_UPDATE_OBJECT. In this packet it is determined by flags
uint8 VehicleExitVoluntary = 0;
ObjectGuid TransportGUID;
uint8 VehicleSeat = 255;