* Core/AI: Make critters flee as soon as engaged in combat and make them evade after they stop running in fear
* Warning and no-pch build fix
(cherry picked from commit 6fde051e4e52d98d1a6cf31b8ad3fcf95e0e83fd)
* 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)
Fix AssistanceMovementGenerator using 100% MOVE_RUN speed instead of 66% . Please note that the fleeing mechanic still has some open issues that this single commit doesn't fix
(cherry picked from commit 862d47394b8c879f42902f03ecd112b65ff631c2)
All erases within MotionMaster are now done by itr.
Previous impl used value erase which uses the custom comparator which does not identify elements uniquely --> wrong values were deleted
ref #23187#discussion_r275791179
(cherry picked from commit 11de6b5f866e087307a719b931be8c51b984c54e)
I'm referencing line 97 from ChaseMovementGenerator.
That commit introduced a modification in this use case:
- Chasing target is not my current victim, I should stop moving till it is my victim again
Changed To:
- Chasing target is not my current vicitm, I should stop chasing
My correction:
- I dont care about the relation of my current victim and my chasing target, I'm commanded to chase, something will tell me to stop chasing
--> Most likely: evade, new attackstart, etc.
the rest are just minor changes
(cherry picked from commit 9080e7863c28df7dc1c2af321964776e7b59e41a)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).
(cherry picked from commit 982643cd96790ffc54e7a3e507469649f3b074d2)
The number of edge cases in which weirdness is seen on "effect movements" will be kinda reduced, plus consistency, plus movementInform on custom movement spline initalizations.
(cherry picked from commit 2a45418032233bc8779cdb44f9be6057c4b417c5)
New movement -> Mutate -> Finish current for that slot that happens to be the same type, Follow -> Finish method on the removed movement -> UpdateSpeed call -> search for top -> crash
Closes#21861
(cherry picked from commit bcab5bc4e7ac3866e86a54a1aa17e1174672ce75)
- Chase to angle is now functional. Pets use this to chase behind the target. Closes#19925.
- Chase to arbitrary range interval works. Not used anywhere, but you can technically make hunter-like mobs.
- Pets now follow the hunter cleanly and without stutter stepping. Also fix some other things. Closes#8924.
(cherry picked from commit 2a84562dc85516f432bb1e5de9add23c28b26ce4)
* Core/Entities: Fix some weird movement due to los issues
- Made LoS check use collisionHeight instead of midsection. Value was too low.
- Gnomes will now have a breath bar more quickly than for example a tauren.
- Changes have been made to checking for ground z as well, some tweeking might be needed but removed most of the scattered +2.0f/+0.5f/we
* Add 0.05f to isInAir check in Creature::UpdateMovementFlags
(cherry picked from commit e42903ec16f4849b71bc8736e3151a1e11d3cd25)
- Use Midsection height for LoS checking.
- Changed MotionMaster::MoveJumpTo to use correct z. This change also makes sure the _owner will jump towards the given angle. Instead of jumping to a unintended angle if the first one is not in LoS.
(cherry picked from commit 95456ab5d8bd623481d315ae55dfbb44b45ba9f5)
- Creature: update current waypoint to store nodeId and pathId
- MotionMaster: change variable type on GetMotionSlotType and GetMotionSlot to keep consistency and prevent errors (ASSERT is now no longer needed)
- UnitAI: add new waypoint hooks WaypointPathStarted and WaypointPathEnded
- SAI: handle WAYPOINT related events if creature is no escorting
* SMART_EVENT_WAYPOINT_RESUMED still not implemented for no escorting
TODO: the new hooks can save, now duplicated, logic on EscortAI and SAI
closes#20777
updates #20310
updates 21bd52cb99
(cherry picked from commit e10d7dd45cfc073c791cd5e5f3f964d14b37df3d)
since MOTION_SLOT_IDLE cannot be expired, signal path done and behave like IdleMotionGenerator
(cherry picked from commit eb2769996f01bfd7d7118503a44705711eb309a3)
remove home position set from creature PauseMovement, and use it when necessary
change log level on DelayedDelete
(cherry picked from commit cd4775420a4894012616d54467eb3827430245b5)
Following the work done in #19361 this is the cleanup and improvement of the related logic of waypoint management.
Ref 28050f3 #18020
(taking the good parts and ignoring the incomplete work)
(cherry picked from commit 7fff83d67526efff63867d41b9e036a19a9287b3)
- Get rid of fugly void pointers
- Streamlined AI selection code, using Permissible as it should've been instead of harcoded checks on the selector code
- Moved IdleMovementGenerator singleton to factory code
(cherry picked from commit ce3787f190d28c1e981598eef2cd24c622a2cbae)
Use own movement generator for creatures following on a formation.
First step of implementation, huge room for improvement.
Closes#19422
(cherry picked from commit 46221b6dc1272989e0de85a4563fc49dba8e7851)
And restore broken _cleanFlag check/use on update (eca3645d8bb655b88e39f05e36b435171f738f70)
(cherry picked from commit 96f4c7c187e03aeb61e905421751f3d5a1df060e)