* according to observations Blizzard is letting creatures do 2 up to 10 spline movements right after each other before waiting for a couple seconds
(cherry picked from commit 78c1216bcf60b9e376d9afd9484ff478bda641b1)
We want our movement to be fully updated before even thinking about interrupting anything. The old logic was updating positions, interrupting stuff and afterwards updating movement generators. This way we were ending up with false interrupts.
properly fixes#22908
(cherry picked from commit 02daf1bf3afc570c26e8e9f431866fcb3720174a)
* Core/PathGenerator: Fix path generator returning shortcuts when start and end are on the same polygon
Second try of handling paths on same poly in a better way than just building a shortcut
* Fix movement generators using paths with start/end positions far from mmap polygons
* Include flag PATHFIND_FARFROMPOLY even with a normal path if start or end were far away from mmap poly
(cherry picked from commit 67d9d04d63cc74196059646b2e57f50a4a4fd2ca)
Temporarily revert 29bf280e3496cf13c24ccb20e37da29d3bfa74d9 since our recast implementation always expects a path to have different polygons.
A proper fix will be implemented later on, splitting a path with 1 single polygons in smaller steps in a similar way of how FindSmoothPath() works
(cherry picked from commit 9f8477cd112bf0f52e23afc9cdee4adfcf540de5)
Fix Ominous Clouds being only clockwise, now they move both clock and counter-clock wise.
Add a workaround for GenericMovementGenerator not handling correctly cyclic splines started by MoveCirclePath(), stopping the movement after a single round. The workaround code can be removed once the bug in GenericMovementGenerator is fixed.
(cherry picked from commit c1df161e1ddf95584030480d3dcb15149aacd7a6)
* spell_gen_turkey_marker::OnPeriodic: Pop expired stack timestamps from tracking list.
* Be a bit more explicit about the data type of removedCount.
* Formatting nudge.
* Remove brackets.
(cherry picked from commit a0c07655eb6b42a2e1fd9319d53c7ed7f2c585d8)
* Core/PathGenerator: Fix path generator returning shortcuts when start and end are on the same polygon
Fix path generator returning shortcuts when start and end are on the same polygon by handling this case as if start and end were on 2 different polygons. This will ensure BuildPointPath() gets called which calls FindSmoothPath(), making sure each step is not longer than SMOOTH_PATH_STEP_SIZE (4 yards)
* Change ingame cast error message to SPELL_FAILED_NOPATH from SPELL_FAILED_OUT_OF_RANGE if the generated path is too long
(cherry picked from commit 29bf280e3496cf13c24ccb20e37da29d3bfa74d9)
* Core/Movement: Fix fleeing speed to 66% run speed
Fix fleeing speed to 66% run speed until the creature starts returning home
* Fix build
* Don't check speed type
* Don't apply speed reduction twice
* Fix no-pch (1st try)
* Make sure every spell focus is interrupted when seeking assistance
(cherry picked from commit 4ccf01de3947f50629c20192da3f99cb8c693b35)
* Core/MMaps: Fix charge underwater
Fix charge sometimes returning "no path available" when swimming/underwater.
Fix charge selecting a destination point 4 yards above swimming/underwater targets
* Allow falling units to charge targets that are below (lower Z coordinate)
* Disable "raycast" pathfinding as it's not blizzlike.
This might show some strange paths when charging with a target in front.
It also fixes some falling undermap issues.
This Reverts 272009ebee
* Remove Z offset when charging a target as it never made sense
(cherry picked from commit 88a14251e2765880e90cb41be7919cd39e3308e2)
After 9c603ea87f09c47d52f093ccc73ee75c15eff6f5, dead creatures will tick UpdateAI
Closes: #24012
(cherry picked from commit 2f31119ea337aedecc593b6bb687ad73390db3a2)
* Core/Movement: Fix wrong orientation set when pausing movement
* Update MoveSpline.h
* Update Unit.cpp
(cherry picked from commit e698c17a2688385e62744cdf5eb37b12b9e304fa)