Skip to content

Conversation

@Stoabrogga
Copy link

Continuation of #3013, which was closed because I deleted my old account.

🍰 Pullrequest

Adjust the algorithm for waypoint movement similar to CMaNGOS:

  • Try to generate movement splines which are at least 6s long
  • 1.5s before the spline is finished start a new spline

This prevents the animation resets occuring at each waypoint.

Issues

Closes #2713

How2Test

Watch different creatures which use waypoint movement, e.g.:

  • Thora Feathermoon (ID 5798, GUID 15169)
  • Theresa (ID 5697, GUID 41840)
  • Lord Kazzak (ID 12397, GUID 156950)
  • Felguard Elite (ID 8717, GUID 2791)
  • Pridewing Soarer (ID 6141, GUID 32374)
  • Westfall Woodworker (ID 6670, GUID 45521)
  • Thomas Booker (ID 1437, GUID 9468)
  • Gordo (ID 10666, GUID 28413)
  • Gazelle (ID 4166, GUID 14049)
  • Wooly Kodo (ID 3237, GUID 15144)
  • Warpwood Tangler (ID 11464, GUID 300943)
  • Grunt Gargal (ID 9086, GUID 6883)
  • Sorcerer Ashcrombe (ID 3850, GUID 16262)

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:

data.appendPackXYZ(offset.x, offset.y, offset.z);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚀 [Feature] Improve waypoint movement

1 participant