Commit Graph

836 Commits

Author SHA1 Message Date
Shauren
73e0b3e77c Core/Creatures: Taxi improvements
* Fixed flight master minimap icon
* Fixed crash on Argus
* Implemented teleport taxi nodes

Closes #29389
2023-10-28 22:13:59 +02:00
Shauren
da0ba86694 Core/MMaps: Implemented a way to enable/disable certain terrain types for movement on the entire map 2023-10-16 11:57:24 +02:00
Shauren
43584b4d1d Core/Misc: Fixed doxygen docs being attached to wrong fields 2023-08-27 01:58:50 +02:00
Shauren
86725ed926 Core/MMaps: Fixed pathing for objects that have terrain swaps active 2023-08-08 00:08:10 +02:00
Shauren
3ca9e1253a Core/Movement: Fixed uninitialized value in MoveSplineInitArgs 2023-05-29 19:32:55 +02:00
Shauren
26950594f6 GCC warning fix 2023-04-21 21:16:06 +02: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
ModoX
0750b7f845 Core/Creature: Implemented sparring with max health percent thresholds (#27198)
Co-authored-by: Ovah <dreadkiller@gmx.de>
2023-04-06 01:01:02 +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
cdc09d29bc Core/Units: Added Unit::SetFacingToPoint function 2023-03-05 15:45:57 +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
Shauren
704142f15a Core/Maps: Fixed retrieving terrain info when on child maps 2022-12-31 18:22:40 +01:00
Meji
8d83c78618 Core/Movement: Don't compute orientation for vertical splines (#28556) 2022-12-30 18:00:05 +01:00
Shauren
fc37c42e55 Core/Misc: Added noexcept to move constructors and move assignment operators 2022-11-06 01:03:35 +01:00
Teleqraph
96295cfc5f Core/Units: Removed spline speed limit for MoveJumpWithGravity (#28142) 2022-07-24 22:20:35 +02:00
Shauren
fbe0b8efeb Core/Maps: Removed MapInstanced - no longer neccessary for grid data reference counting (moved to TerrainInfo) 2022-07-24 18:56:40 +02:00
Shauren
16a06346ae Core/Maps: Move terrain data handling out of Map class
Partial port of cmangos/mangos-wotlk@ff5232c648
2022-07-23 19:13:33 +02:00
Ovah
8501fb572a Core/Movement: Allow waypoints to use 0 as valid facing value (#26655)
(cherry picked from commit 4747515872)
2022-06-10 16:50:17 +02:00
Shauren
f36cec3833 Core/Movement: b1a94bf94c followup - MoveSplineInit is no longer movable or copyable
(cherry picked from commit b9c986cadd)
2022-06-10 15:16:54 +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 b1a94bf94c)
2022-06-10 15:16:39 +02:00
Shauren
b9353041a6 Core/Movement: Allow overwriting number of steps for spline length calculations
* Also minor cleanup of non-virtual functions in spline derived classes
2022-06-07 15:13:54 +02:00
Shauren
630b60eb0d Core/GameObjects: Transport (type 11) improvements
* Fully synchronize serverside animation progress with client
* Implemented updating passenger positions on elevators
* Removed visibility hack for elevators that always forced CreateObject packet to be sent to client
2022-05-25 22:14:32 +02:00
Shauren
41a04a0c49 Core/Scripts: Begin unifying triggering gameevents (not the game_event db stuff) 2022-04-24 00:16:13 +02:00
Shauren
b47185cabf Core/Misc: Rename AddXXXFlag updatefield functions to SetXXXFlag 2022-03-27 18:14:47 +02:00
Shauren
1d30f7ae2b Core/Misc: Add TempSummon timer to GetDebugInfo
(cherry picked from commit 7b9b785c51)
2022-03-22 00:16:57 +01:00
offl
ad0ebedd9b Core/Misc: Rename UNIT_FLAG_SWIMMING to UNIT_FLAG_CAN_SWIM
Ref #26912

(cherry picked from commit e4a82ee97a)
2022-03-15 23:47:31 +01:00
offl
661a24b7b1 Core/Misc: Rename UNIT_FLAG_TAXI_FLIGHT to UNIT_FLAG_ON_TAXI
Ref #26912

(cherry picked from commit a50ce8755b)
2022-03-15 23:32:27 +01: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 ff26027453

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

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

* Keep MoveJump movement generator after death

Co-authored-by: ccrs <ccrs@users.noreply.github.com>
(cherry picked from commit 9fe9dc087b)
2022-03-10 23:57:14 +01:00
ccrs
0e0deaefd4 Core/Movement: remove redundant method MovementGenerator::NotifyAIOnFinalize and use existing Finalize - MovementInform implementation
6fde051e4e follow up

(cherry picked from commit 303e01c834)
2022-03-10 23:53:54 +01:00
Giacomo Pozzoni
6b242eee13 Core/Unit: Fix movement hiccups in water (#24020)
* Core/Unit: Allow to define Units which can enter water but cannot swim

Allow to define Units which can enter water but cannot swim, i.e. crabs walking at the bottom of a sea.

* Add UNIT_FLAG_SWIMMING to creatures when entering combat

* Fix charmed creatures not entering water

* Always allow Creatures controlled by players to enter water

* Add swimming flag when possessing a unit and remove it properly at the end, even if the creature engaged combat before and after.
When adding/removing UNIT_FLAG_SWIMMING manually calling Creature::RefreshSwimmingFlag(true) might be required.

(cherry picked from commit fc1a0d9368)
2022-03-05 23:04:24 +01:00
Ovah
eeac4a12f2 Core/Movement: add optional velocity argument for MoveLand and MoveTakeoff (PR #25516)
(cherry picked from commit 31abdc6ecf)
2022-02-28 14:08:22 +01:00
xvwyh
1a073e2df0 Core/PathFinding: Fix GetPathPolyByPosition() using only 2D distance instead of 3D
Signed-off-by: jackpoz <giacomopoz@gmail.com>
(cherry picked from commit 2d6237f06a)
2022-02-27 20:08:41 +01:00
Shauren
439b027d48 Core/Misc: Cleanup unused includes 2022-02-13 15:07:00 +01:00
Shauren
ad4f4bfab7 Core/Misc: Minor game include cleanup 2022-02-13 00:49:10 +01:00
Shauren
f8ad7017dd Core/Misc: Move (or delete) constructors and destructors to .cpp files (avoids compiling them in every file that includes them) 2022-02-12 21:36:46 +01:00
NoName
ee620856ad Core/Movement: Corrected Animation Tier handling (PR #24875)
Co-authored-by: Warpten <vertozor@gmail.com>
Co-authored-by: Ovahlord <dreadkiller@gmx.de>
Co-authored-by: Carbenium <carbenium@outlook.com>
(cherry picked from commit dad187615d)
2022-02-05 15:40:31 +01:00
Keader
91f6163858 Core/MotionMaster: Do not generate path to MoveLand
(cherry picked from commit 141d3d2718)
2022-02-05 14:44:18 +01:00
Treeston
fc094509e9 Core/Scripts: Remove now-unused WaypointPathStarted hook. WaypointStarted does everything it used to do, anyway. b3694bf follow-up.
(cherry picked from commit c9356190b7)
2022-02-05 13:31:50 +01:00
Treeston
4d62cc70d6 Scripts/Commands: Convert argument parsing of .npc commands
(And I snuck some chat command cleanup in there, more de-cluttering!)

(cherry picked from commit 88d446dadf)
2022-02-05 00:43:55 +01:00
jackpoz
1f34964df4 Core/Movement: Fix RandomMovementGenerator for swimming creatures
Fix RandomMovementGenerator for swimming creatures not moving at all due to PATHFIND_FARFROMPOLY being handled as wrong path.
Fixes #25236

(cherry picked from commit 1aceb41349)
2022-02-04 00:27:12 +01:00
jackpoz
7ea19b675f Core/Metric: Require WITH_DETAILED_METRICS CMake flag for MMaps metric
(cherry picked from commit 8ad6bd8a9b)
2022-01-26 14:07:00 +01:00
Carbenium
8809d54ca2 Core/Common: Merge TimeTrackerSmall with TimeTracker
(cherry picked from commit 228696bf80)
2022-01-24 21:34:36 +01:00
Giacomo Pozzoni
61bf51874d Core/Misc: Fix static analysis issues (#25178)
(cherry picked from commit 7cf122fc2a)
2022-01-24 20:21:25 +01:00