Conversation
Thanks to Gamemechanic
|
Concerning the small "jumps" or "teleports" I did a bit more testing: Use high precision linear splines on the clientThis needs client and server patching: Result: Looks much better, but there is still a small "teleport" forward, like at the beginning of this video: Use low precision linear splines on the serverServer patch: Please note that this is just a quick-and-dirty implementation, which also does not take partial linear splines into account (see mangosd parameter "Movement.MaxPointsPerPacket"). But it suffices for a few tests. Result: More or less the same as with high precision. The small "teleport" forward is still there: ConclusionIt seems that the movement looks better if the server and the client use the same precision for their linear splines. I still don't know what causes the small "teleport" forward at the beginning. Perhaps wrong calculation of the spline duration? core/src/game/Movement/spline/packet_builder.cpp Lines 147 to 148 in 29fb21c |
Continuation of #3013, which was closed because I deleted my old account.
🍰 Pullrequest
Adjust the algorithm for waypoint movement similar to CMaNGOS:
This prevents the animation resets occuring at each waypoint.
Issues
Closes #2713
How2Test
Watch different creatures which use waypoint movement, e.g.:
Also watch creature formations without waypoint movement, e.g. Emeraldon Boughguard (GUID 33246, ID 12474).
Sometimes there are small "jumps" visible while the NPC follows its path, example:
https://github.com/user-attachments/assets/221bbc42-1844-428f-92bb-bbf1c689cc4d
This is not related to this PR, it is caused by the client using low precision linear splines (3 float values packed into one integer value) and the server using high precision. The low precision linear spline coordinates are generated here for the client:
core/src/game/Movement/spline/packet_builder.cpp
Line 108 in 82edaee