Skip to content

fix(Core/Movement): Fixed the random movement speed of biological pets#24453

Open
PkllonG wants to merge 8 commits intoazerothcore:masterfrom
PkllonG:SetWalk
Open

fix(Core/Movement): Fixed the random movement speed of biological pets#24453
PkllonG wants to merge 8 commits intoazerothcore:masterfrom
PkllonG:SetWalk

Conversation

@PkllonG
Copy link
Contributor

@PkllonG PkllonG commented Jan 17, 2026

Changes Proposed:

This PR proposes changes to:

  • Core (units, players, creatures, game systems).
  • Scripts (bosses, spell scripts, creature scripts).
  • Database (SAI, creatures, etc).

AI-assisted Pull Requests

Important

While the use of AI tools when preparing pull requests is not prohibited, contributors must clearly disclose when such tools have been used and specify the model involved.

Contributors are also expected to fully understand the changes they are submitting and must be able to explain and justify those changes when requested by maintainers.

  • AI tools (e.g. ChatGPT, Claude, or similar) were used entirely or partially in preparing this pull request. Please specify which tools were used, if any.

Issues Addressed:

SOURCE:

The changes have been validated through:

  • Live research (checked on live servers, e.g Classic WotLK, Retail, etc.)
  • Sniffs (remember to share them with the open source community!)
  • Video evidence, knowledge databases or other public sources (e.g forums, Wowhead, etc.)
  • The changes promoted by this pull request come partially or entirely from another project (cherry-pick). Cherry-picks must be committed using the proper --author tag in order to be accepted, thus crediting the original authors, unless otherwise unable to be found

Tests Performed:

This PR has been:

  • [ ✔ ] Tested in-game by the author.
  • Tested in-game by other community members/someone else other than the author/has been live on production servers.
  • This pull request requires further testing and may have edge cases to be tested.

How to Test the Changes:

  • This pull request can be tested by following the reproduction steps provided in the linked issue
  • This pull request requires further testing. Provide steps to test your changes. If it requires any specific setup e.g multiple players please specify it as well.
  1. .go c id 16345 .go c id 669 .go c id 458
  2. observe the pets' movement
  3. They should run after the battle starts

Known Issues and TODO List:

  • [ ]
  • [ ]

How to Test AzerothCore PRs

When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].

You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:

http://www.azerothcore.org/wiki/How-to-test-a-PR

REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).

For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.

@github-actions github-actions bot added CORE Related to the core file-cpp Used to trigger the matrix build labels Jan 17, 2026
@sudlud sudlud requested a review from Copilot January 19, 2026 07:53
@sudlud
Copy link
Member

sudlud commented Jan 19, 2026

@killerwife can you please take a look at this pr :)

@killerwife
Copy link
Contributor

killerwife commented Jan 19, 2026

Absolutely not valid fix. Here is the reasoning:

SetWalk should eventually be a setting only the scripter manipulates (and is set otherwise only on spawn)

The state of a pet running/following should be done with Follow Movement (or formation movement). Reason being that there are cases where specifically a pet stops its follow and is engaged on its own waypoints, and as such stuff cant be automatic to a point where it hinders this functionality.

The current code should behave in a way that it sets the walk/run for the current movement, and NOT for any subsequent movements (i.e. state of creature doesnt change).

One should look into FollowMovementGenerator. Pets dynamically change their speeds based on the distance they are from their master on official. If far, run quickly, if small adjustment while owner is stationary, walk, etc.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@PkllonG
Copy link
Contributor Author

PkllonG commented Jan 19, 2026

The PR did not change the way pets move; the PR fixed the way pet owners move.

@killerwife
Copy link
Contributor

Pet needs to adjust to owner, not owner to pet. (if i understand, u fixed jitter of pets by changing owner, and owner of pet is meant to be scripted by scripter not some automatic logic)

@PkllonG

This comment was marked as spam.

@killerwife
Copy link
Contributor

I am the author of the changes made to it. NPC can be walking and not be in walking state. "Walking" clientside is speed based, not state based.

As such movement->m_spline can have speed == 2.5f (walking) but SetWalk == false. Same goes for IsWalking - can be true .

SetWalk in Acore sends SMSG_SPLINE_MOVE_SET_WALK_MODE : SMSG_SPLINE_MOVE_SET_RUN_MODE

Is sniff versus which you are fixing issue sending this packet?

If you give me proof I will gladly change my opinion.

@PkllonG
Copy link
Contributor Author

PkllonG commented Jan 19, 2026

You're right, we don't need to send packets.

@PkllonG
Copy link
Contributor Author

PkllonG commented Jan 19, 2026

You're right, we only need to update MOVEMENTFLAG_WALKING to achieve the goal.

@PkllonG
Copy link
Contributor Author

PkllonG commented Jan 19, 2026

Latest changes
[ ✔ ] Tested in-game by the author.

@killerwife
Copy link
Contributor

One more insight, that is currently wrong entirely in Acore: You are also not meant to use MOVEMENTFLAG_WALKING for creatures. Clientside creatures do not use this flag, only players. Feel free to check sniffs again to confirm my statement. (movement flags are broadcast in smsg_update_object on spawn)

@killerwife
Copy link
Contributor

Also likely this problem is result of this:

#24410

Feel free to validate. (and that pr is correct vs sniffs, might be a side effect)

@LannyE
Copy link
Contributor

LannyE commented Jan 19, 2026

Will this fix the craziness in Stormwind with many of its citizens that follow another (who is walking) are trying to plow through them? The ones following another that is running is unaffected like William and Donna.

Miss Danna and her students trying to push her
Wow 2026-01-19 11-06-34

Janey Anship and her very impatient friends
Wow 2026-01-19 11-11-30

Karlee Chadiss and the two kids behind her.
Wow 2026-01-19 11-13-25

Even Lil' Timmy's white cat is trying to push him.

I think these follower NPCs use smart scripts to follow (SMART_ACTION_FOLLOW) the leader NPC.

@LannyE
Copy link
Contributor

LannyE commented Jan 24, 2026

I finally had time to test but this change will not fix the SMART_ACTION_FOLLOW issue.

@PkllonG
Copy link
Contributor Author

PkllonG commented Jan 25, 2026

I finally had time to test but this change will not fix the SMART_ACTION_FOLLOW issue.

This PR fixes the error caused by #24410.

@PkllonG
Copy link
Contributor Author

PkllonG commented Jan 25, 2026

I finally had time to test but this change will not fix the SMART_ACTION_FOLLOW issue.

You can use this #1 to fix the error you mentioned.

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

Labels

CORE Related to the core file-cpp Used to trigger the matrix build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NPC summoned pets always follows their masters at running speed

4 participants