Commit Graph
211 Commits
Author SHA1 Message Date
Shauren 71ebbc60cc Core/Movement: Remove MotionMaster::MoveJump(x, y, z) overload 2025-11-18 00:32:06 +01:00
Shauren f94a3e1487 GCC build fix 2 2025-11-17 16:37:01 +01:00
Shauren 93b0c4a317 GCC build fix 2025-11-17 16:27:42 +01:00
Shauren e9dff62f33 Core/Movement: Implemented vertical-only knockbacks for creatures 2025-11-17 16:18:04 +01:00
Meji c4bec744ad Core/Movement: Knockback improvements (#28081)
* Knockbacks with negative speeds will now be validated and processed.
* Creatures that cast knockback spells on themselves will use their orientation to determine the direction of movement.
2025-11-16 20:25:56 +01:00
Shauren 07e9f3e75e Core/Movement: Add new function allowing any tier transition animation to be used, not only land/takeoff 2025-11-11 23:45:06 +01:00
Shauren e02e8a4742 Core/Movement: Spline code cleanup
* Remove unneccessary reserve in MoveSplineInitArgs constructor - MoveTo always resizes it
* Remove unused function computeDuration
* Split cyclic spline reinitialization to separate function
* Don't expose TransportPathTransform outside of MoveSplineInit
* Ensure function argument names are the same in declaration and definition
2025-06-17 23:09:08 +02:00
Shauren d778d5ec7c Core/Misc: Include cleanup - remove MapUtils.h from Containers.h 2024-12-31 18:12:36 +01:00
ModoX 51872d50ff Core/Movement: Made fixed ChaseAngle optional and added possibility to ignore setting walk/run depending on target (#30101) 2024-08-02 22:46:29 +02:00
Shauren bd9fb4a563 Core/Movement: Defined and implemented new spline flag - JumpOrientationFixed 2024-06-29 18:15:43 +02:00
Shauren ac73edc268 Core/Movement: Allow setting position or object facing targets for jump movement 2024-06-21 15:35:12 +02:00
Shauren dad976beb4 Core/Movement: Migrate scripts using GetMotionMaster()->MoveSmoothPath to GetMotionMaster()->MovePath and kill it (they now have the same capabilities) 2024-04-25 00:42:16 +02:00
Shauren cf1ab7b414 Core/Movement: Implemented alternative method of smoothing waypoint paths (send new point 1.5 before arrival) and make that the default
* Sending whole path at once is still supported with WaypointPathFlags::ExactSplinePath
2024-04-21 00:16:57 +02:00
Shauren be3ae90dc4 Core/Movement: Ensure land and takeoff animations even if gravity enabled/disabled state is not what spline generator expects 2024-04-07 00:05:46 +02:00
Shauren b265c49977 Core/Scripts: Integrate new ActionResultSetter with movement generators and spells 2024-04-06 20:50:59 +02:00
Shauren 038f995ad6 Core/Movement: Allow overriding speed for taxi movement generator 2024-04-04 16:17:09 +02:00
Shauren 4131022f6c Core/Entities: Make ObjectGuid formattable with fmt without using ToString() 2024-03-31 19:32:39 +02:00
Shauren ca656f4254 Core/Movement: FIxed followPathBackwardsFromEndToStart parameter of MotionMaster::MovePath 2024-03-12 11:49:42 +01:00
Shauren 59f92412d0 Core/Movement: MoveRotate improvements
* Allow overriding rotation speed
* Allow limiting rotation using total rotation angle instead of duration
2024-02-28 21:10:05 +01:00
Shauren cc47fd75b4 Core/Movement: Removed template from FleeingMovementGenerator 2024-02-22 18:21:52 +01:00
Shauren 88242a42ce Core/Movement: MoveCirclePath new features
* Duration limit
* Customizable speed
2024-02-18 15:19:35 +01:00
ModoX 12186ef857 Core/Waypoints: Refactor to split data into path and node related info in db (#29506) 2024-01-05 17:56:19 +01:00
Shauren 295c8f6326 Core/Spells: Fixed effects targeting the caster not hitting him immediately on spell launch if the spell targets a dest
* Also improve hit timing for charge spells
2023-04-21 19:05:38 +02:00
Shauren 8bf3bc071b Core/Movement: Allow passing tier transition id (db2 id) to land/takeoff movement 2023-03-26 12:22:41 +02:00
Shauren 4300c3edd3 Core/Movement: Refactor TimedFleeingMovementGenerator to use chrono types 2023-03-11 13:35:46 +01:00
Shauren cf2e0e2faa Core/Movement: New waypoint movement features
* Allow going backwards on a repeatable waypoint path (instead of going directly to first point)
* Allow triggering random movement on path ends
* Max duration of waypoint movement
* Skipping mmap usage
* Forced speed for whole path
* Forced run/walk for whole path
2023-03-07 20:13:28 +01:00
Shauren 705d5701bf Core/Movement: Refactor jump speed calculation out of spell code 2023-03-06 00:14:42 +01:00
Shauren 39b76cfbc2 Core/Movement: Allow specifying timeout for follow movement 2023-03-04 14:57:17 +01:00
Shauren 0026706e83 Core/Movement: Extend MovePoint with new arguments
* Forced speed
* Speed selection mode (walk, run or default)
* Distance from target point that is considered close enough to finalize movement
2023-03-02 23:24:42 +01:00
Shauren 66b29fba44 Core/Movement: Allow specifying timeout for random movement 2023-03-01 21:58:07 +01:00
Shauren d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
Shauren ba9bbbc9d0 Core/Misc: Fixed deprecation warnings for c++20 2023-01-01 00:26:53 +01:00
Teleqraph 96295cfc5f Core/Units: Removed spline speed limit for MoveJumpWithGravity (#28142) 2022-07-24 22:20:35 +02:00
Shauren 36dde87249 Core/Movement: Delay creating MoveSplineInit objects used by GenericMovementGenerator to spline launch time
* This fixes inconsistent transport state detection for players exiting vehicles that are on transport (ICC gunship battle), fixes players being telerpoted to middle of nowhere on that fight

(cherry picked from commit b1a94bf94c500b64a5c4ae92642a95d048d9f392)
2022-06-10 15:16:39 +02:00
Giacomo Pozzoni 8111f50d03 Core/Movement: Add new flag MOVEMENTGENERATOR_FLAG_PERSIST_ON_DEATH (#26549)
* Core/Movement: Add new flag MOVEMENTGENERATOR_FLAG_PERSIST_ON_DEATH

Add new flag MOVEMENTGENERATOR_FLAG_PERSIST_ON_DEATH to keep movement generators even after death.

Fixes #23095
Could replace ff26027453179448bb972d88a51e565d71e95f3f

* Core/Movement: reorder new method MotionMaster::StopOnDeath

* Core/Movement: reorder new method MotionMaster::StopOnDeath

* Keep MoveJump movement generator after death

Co-authored-by: ccrs <[email protected]>
(cherry picked from commit 9fe9dc087b4dc52af7897942a83c1f880d3a4ef8)
2022-03-10 23:57:14 +01:00
ccrs 0e0deaefd4 Core/Movement: remove redundant method MovementGenerator::NotifyAIOnFinalize and use existing Finalize - MovementInform implementation
6fde051e4e52d98d1a6cf31b8ad3fcf95e0e83fd follow up

(cherry picked from commit 303e01c834d5edd1336a005a0ecf58cc82cfee1b)
2022-03-10 23:53:54 +01:00
Ovah eeac4a12f2 Core/Movement: add optional velocity argument for MoveLand and MoveTakeoff (PR #25516)
(cherry picked from commit 31abdc6ecfd84ef019880ffb531bf0298f921e77)
2022-02-28 14:08:22 +01:00
NoName ee620856ad Core/Movement: Corrected Animation Tier handling (PR #24875)
Co-authored-by: Warpten <[email protected]>
Co-authored-by: Ovahlord <[email protected]>
Co-authored-by: Carbenium <[email protected]>
(cherry picked from commit dad187615df603ad8614531a0ec84c1a5e136838)
2022-02-05 15:40:31 +01:00
Keader 91f6163858 Core/MotionMaster: Do not generate path to MoveLand
(cherry picked from commit 141d3d27185f02c300c1530d9cecb44b473e7fda)
2022-02-05 14:44:18 +01:00
Ovah a3d28efcfa Core/Movement: various improvements for creature knockbacks
* creature knockbacks will no longer generate a full path but instead only use a destination point to reflect sniff data
* calculate the destination by using a mmap raycast instead of using a mmap path which had the chance of creating weird movements when GetNearPosition failed to get a proper collision point (knocking arround a tree for example or just somewhere it should not go at all)

(cherry picked from commit cfd63c350f5b01fd699903b17162b2f5167b1386)
2022-01-01 19:17:05 +01:00
jackpoz 33e495983b Core/Movement: Add safety check to avoid C++ undefined behaviour
(cherry picked from commit 67f28adaf738ebf1377d06adac2fa30033928dd6)
2022-01-01 12:42:31 +01:00
Eridium 924116f046 Core/Movement: Formation Rewrite (#24379)
* Core/Movement: Formation Rewrite

* Add a missing include

* fixed another warning

* meh

Co-authored-by: Ovahlord <[email protected]>
Co-authored-by: Ovah <[email protected]>
(cherry picked from commit 0e2342c1698d9e2dc8a8c9d559f232cbb83707cb)
2021-12-31 19:28:14 +01:00
Giacomo Pozzoni 934c320d4b Core/AI: Make critters flee as soon as engaged in combat and make them evade after they stop running in fear (#24320)
* 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)
2021-12-23 22:32:41 +01:00
NoName 61f3d51143 Core/Movement: Implement MoveSplineFlag::Enter_Cycle (#24049)
by xvwyh

(cherry picked from commit 40542f01e3fec0bff2c6e5eadbe20e58f19b0fd8)
2021-12-22 14:33:58 +01:00
ratkosrb 72093e98e1 Core/Creature: Use proper name for wander distance. (#24133)
* Use proper name for wander distance.

* Rename db field.

* Fix query.

* Remove underscore from chat command.

* Rename the handler too.

* Update chat command description.

* Fix remaining issues.

* Rename 2020_99_99_99_world_335.sql to 2020_02_16_01_world.sql

Co-authored-by: Giacomo Pozzoni <[email protected]>
(cherry picked from commit 6176ce92ea01fd33b11c2e7f8e9ebb509e80c944)

# Conflicts:
#	sql/updates/world/master/2020_02_16_01_world.sql
#	src/server/database/Database/Implementation/WorldDatabase.cpp
#	src/server/game/Entities/Creature/Creature.cpp
#	src/server/game/Globals/ObjectMgr.cpp
#	src/server/game/Globals/ObjectMgr.h
#	src/server/scripts/Commands/cs_npc.cpp
2021-12-21 19:50:12 +01:00
Giacomo Pozzoni d095d4afe9 Fix fleeing speed to 66% run speed (#24025)
* 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)
2021-12-19 17:39:25 +01:00
jackpoz 2327ff4d6d Core/Movement: Fix fleeing speed to 66% run speed
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)
2021-12-19 15:34:20 +01:00
Giacomo Pozzoni b40cadd5a1 Core/Movement: Fix stunned falling units freezing the client (#24000)
(cherry picked from commit 8f94c9ef6b843f69d014b7e3a4b3b30e5d1515e4)
2021-12-19 15:33:57 +01:00
ccrs 1add1c31d8 Core/Movement: prevent any Initialize queue till AddToWorld is signaled
(cherry picked from commit c9c6871659bf2be52b4656bc641df5211fcb928f)
2021-12-18 23:18:26 +01:00
ccrs a59e4da7f5 Core/Movement: d033032 followup
ty jackpoz

(cherry picked from commit 5d056f37c74b652b3a3372d6aa88ac5e183f9d98)
2021-12-18 23:14:40 +01:00