Commit Graph
143 Commits
Author SHA1 Message Date
ccrs d376058dcc Core/Movement: crashfix
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)
2021-09-26 01:43:24 +02:00
ccrs 4793b073ee Core/Misc: movement header cleanup
(cherry picked from commit f9914caefc59f36ab7583432442a26b29124b7f1)
2021-09-26 01:22:17 +02:00
Treeston 1493920495 Core/Movement: Replace old TargetedMovementGenerator into ChaseMovementGenerator and FollowMovementGenerator, full rewrite for both.
- 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)
2021-09-24 23:37:43 +02:00
Treeston f69d12504c Core/Object: Bump hover delta handling on nearpoints downstack into GetNearPoint2D (from movement generators); functionality should be unchanged
(cherry picked from commit ebc96af6bb784819ba8824ac390864ae9ba12351)
2021-09-23 22:28:06 +02:00
Treeston bc89e1cdb0 Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good.
(cherry picked from commit 4692e10ca2ffed5ba2a0336e9c93962b0fad9eaa)
2021-09-23 22:21:29 +02:00
Shauren 2e2b298618 Core/Movement: Fixed creature hover
Closes #15177

(cherry picked from commit 2baa81065ba27f0a6d278a8dd8a79b7c831e0a2b)
2021-08-24 12:44:38 +02:00
Jeremy 446fc391f0 Core/Entities: Fix some weird movement due to los issues (#21125)
* 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)
2021-04-15 05:53:27 +02:00
Kittnz c6d6ece1c7 Core/Movement: Add MovePoint with facing (#20779)
(cherry picked from commit cd88406de9467127e988e4b0f7e2ba0ec787636b)
2021-04-15 05:53:27 +02:00
Golrag fe362cf2c9 Core/Entities: Some changes to LoS z checking & MotionMaster::MoveJumpTo (PR #20970)
- 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)
2021-03-15 20:17:31 +01:00
Shauren 34cd11860d Core/Misc: Fixed nopch MSVC build
(cherry picked from commit e977bb4c4de3608cbbfe0b2d28cd0f4176a44777)
2021-02-25 19:59:07 +01:00
ccrs bf12bae467 Core/Misc: waypoint movement
- 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)
2021-01-29 19:23:53 +01:00
ccrs 5e39572c06 Core/Movement: 7fff83d6752 followup
since MOTION_SLOT_IDLE cannot be expired, signal path done and behave like IdleMotionGenerator

(cherry picked from commit eb2769996f01bfd7d7118503a44705711eb309a3)
2020-08-23 00:52:05 +02:00
ccrs 0a133e77d6 Core/Movement: 7fff83d6752 followup
remove home position set from creature PauseMovement, and use it when necessary
change log level on DelayedDelete

(cherry picked from commit cd4775420a4894012616d54467eb3827430245b5)
2020-08-23 00:48:46 +02:00
ccrs 97585597f0 Core/Movement: waypoint movement (#20121)
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)
2020-08-23 00:45:46 +02:00
ccrs 6209ceddb9 Core/Movement: ee2d7c1d53 followup
(cherry picked from commit 4f43f4d72f10cf1f4e522979f1050e5141c226c2)
2020-08-22 20:50:56 +02:00
ccrs b521bf1d3a Core/Movement: PropagateSpeedChange should only be called on the top (current active) movement generator
(cherry picked from commit 40903dcd65ef2b15efed6a32669c6b659685e7bd)
2020-08-22 20:50:24 +02:00
ccrs 4cf5cb9031 Core/Movement: add new helper that cleans the referenced MovementSlot
(cherry picked from commit ee2d7c1d53986d32779379caf0591d6cde530ead)
2020-08-22 20:49:13 +02:00
ariel- 1881088744 Core/AI: Factory functions cleanup
- 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)
2020-06-14 23:49:05 +02:00
ccrs 84df2c57a3 Core/Movement: FormationMovementGenerator
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)
2020-04-27 12:25:52 +02:00
ccrs 14c6a4d823 [3.3.5] Core/Movement: MotionMaster & MovementGenerators cleaning (#19361)
(cherry picked from commit 21b8c4997a260b5e2dc24ab07df17d3daa6b8b5d)
2020-04-27 12:25:52 +02:00
ccrs f135b7aea1 Core/Movement: 96f4c7c followup
(cherry picked from commit 9be7f5f57b897888983a9ca6f441479f3571513c)
2020-04-24 17:18:50 +02:00
ccrs b2d1b11326 Core/MotionMaster: cleanup use of _expireList
And restore broken _cleanFlag check/use on update (eca3645d8bb655b88e39f05e36b435171f738f70)

(cherry picked from commit 96f4c7c187e03aeb61e905421751f3d5a1df060e)
2020-04-24 17:18:50 +02:00
ccrs dbe54973fb Core/Movement: cleanup MovementGeneratorType
(cherry picked from commit fce974c3b33b38b71166960d37ca8cff67fa8f14)
2020-04-24 17:18:49 +02:00
Chaouki Dhib 5d076cfe29 Core/Spells: fix wrong distance calculations in AoE spells [Needs testing] (#16290)
Core/Spells: Fix wrong distance calculations in AoE spells.
Pull request #16290 by chaodhib.
God bless, finally.

(cherry picked from commit a1f2f30c145f6ad9c4baeffeff32618e71ff537c)
2020-04-24 17:18:49 +02:00
Aokromes b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
ariel- 396457e36a Core/Movement: Corrected all speed checks after 23b6991273bac4ee9d7cf1b4ac3b9a92e0a7300e
Ref issue #19210

(cherrypicked from 2e68736afcab26d0bb8e1408fa639d09d4772dfb)
2019-08-17 20:04:14 +02:00
Riztazz 2caec4f4d2 Revert "[3.3.5][master] Core/Movement: Smooth movement #13467 (#18020)"
This reverts commit 05fb27dae4.

(cherrypicked from a3c6880579f3326088ecbe5b8c08c4b75ed91a59)
2019-08-17 20:04:14 +02:00
xinef1 cfefd27cb8 Added some missing SetFallInformation calls (#19121)
Fixed HP drop bug on zeppelins
Fixed possible packet relocation problems on huge transports

(cherrypicked from b3f04ec1570c7fd6ef0d1dacfb7ff9f8ab00a43d)
2019-07-21 21:06:54 +02:00
vincent-michael 5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren 91be2332e2 Core/Entities: Phasing rewrite
* Optimized phase visibility checking
* Handle all phase flags

Closes #16758
Closes #21119
2018-03-25 19:28:36 +03:00
Chaouki Dhib 91a70f9aa2 Core/Movement: minor MotionMaster refactor (#18367)
(cherry picked from commit eca3645d8bb655b88e39f05e36b435171f738f70)
2018-03-12 10:32:04 +01:00
Riztazz 05fb27dae4 [3.3.5][master] Core/Movement: Smooth movement #13467 (#18020)
Implement smooth movement for all waypoint pathing and escortai

(cherry picked from commit 28050f338dfc66e0c40b6a3915bf96e38e0613e5)
2018-02-11 15:53:32 +01:00
Aokromes b3e2684675 Merge pull request #18053 from ccrs/motion
Core/MotionMaster: cleanup, reordering and renaming

(cherry picked from commit fe68b2e99851a888c5182d7bebddfea67459afd3)

# Conflicts:
#	src/server/game/Movement/MotionMaster.cpp
#	src/server/game/Movement/MotionMaster.h
2018-02-11 14:43:04 +01:00
vincent-michael 7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Golrag 9128b00f59 Core/Movement: Set CatmullRom only when flying when using MoveSmoothPath (#19903) 2017-07-13 17:50:13 +02:00
Shauren b453e12423 Core/Game: Include cleanup part 5
* ObjectMgr.h
* Player.h
* Unit.h
* G3D should no longer propagate everywhere from Spline/MotionMaster
2017-06-04 01:00:45 +02:00
Shauren f2039981e0 Core/Game: Include cleanup, part 3 2017-05-20 00:09:37 +02:00
Shauren 7e538980a2 Core/Database: Include cleanup 2017-05-12 18:50:27 +02:00
joschiwald 036f67c0c1 Core/Collision: Replaced phasemask with proper phases in GameObject collision calculation 2017-05-05 21:22:58 +02:00
Aokromes d8fdc893ee Commit name: Add flying check to MoveSmoothPath
By Malcrom
2017-04-16 15:10:48 +02:00
Shauren 3731f4087b Core/Movement: Pass SpellEffectExtraData PointMovementGenerator 2017-03-14 16:36:10 +01:00
Shauren fd0d0f25a9 Core/Spells: Fixed extra charge effect visuals 2017-03-12 00:40:52 +01:00
treeston b12f19f066 Movement/SplineChain: Streamline the script workflow for resume info a bit, provide static method that does all the ugly pointer casts for you. Also prevent a nullptr dereference crash if scripts mishandle motionmaster, and canonize Chain == nullptr to signify "no resume info".
(cherry picked from commit d3214a0012cf93a5e66d1dc405ac90c4abc1b8c3)

d3214a0 follow-up for code style.
(cherry picked from commit 4deeee66bda390d2b35b64aaeb5924dac4170e10)
2017-03-02 21:10:00 +01:00
treeston 205ec4c3bf Core/Unit: Standardize SetFacingTo and SetFacingToObject behavior while moving. Both now fail while moving unless arg2 bool is true.
Movement/SplineChain: Bump value range for DB chainId up to uint16 (0 to 65535) from uint8 (0 to 255). Turns out sniffs generate far more chains than I expected.

(cherry picked from commit 2170541a51ced3c15675b8854e0ae49461884f8c)

Code style follow-up, I blame Notepad++.
(cherry picked from commit 7860da0de6e53c7740862cae18840c9d399dda7f)
2017-03-02 20:47:29 +01:00
treeston 59d48ce7e4 Core/Movement: Add new SplineChainMovementGenerator that allows accurate replication of sniffed waypoints in static sequences, along with DB facilities that allow loading of waypoints from DB.
(cherry picked from commit 6d00d3f28380dd0811a18913450b1dc4f07fef48)

Merge remote-tracking branch 'Treeston/3.3.5-splinechains' into 3.3.5 (PR #17946)
(cherry picked from commit 20f483967fb3a430fbd54148c08b6d8e8937daac)

Core/Movement: Add a convenience default ctor to SplineChainResumeInfo, and fix PCH build in some configurations (zzz why do we even keep Appveyor and Travis around).
(cherry picked from commit 4fa646c0b2ae3261e7fab249f4177900d4c8d013)

PCH build fix. Again.

(( Alright, you made me waste 20 minutes of my life on a full nonPCH rebuild of the core now. ))
(( I hope you're happy. ))
(cherry picked from commit 4a1a460241acf511467decd92d2a30e19927d74d)
2017-03-01 22:03:35 +01:00
Shauren 5e437f5d3d Core/Movement: Implement SpellEffectExtraData curve modifiers 2017-02-18 21:55:28 +01:00
treeston 7b3b333dd5 Core/Position: Allow implicit casting to G3D::Vector. Also, add a utility overload to MotionMaster.
(cherry picked from commit 9f15482b849d7a77a4a0cc68f18aabb8ee6c58c9)
2017-02-18 17:55:40 +01:00
Aokromes 433162875d Core/Movement: Update MoveSmoothPath for flying creatures
By Malcrom
2017-01-14 15:03:47 +01:00
SnapperRy 2e5550758c Core/Movement: interrupt a creature's current cast when fleeing for assistance, and (if spell is not castable while moving) when running random/fleeing movement generators. (#17271)
Also make sure the creature is alive before updating.

Fixes #12823.
(cherry picked from commit 2db9269ec1c06b5fccc45dc0a5b4f714f9b48804)

DB/Creature: World Trigger (Not Immune NPC) InhabitType update

Closes #17332 by Malcrom
(cherry picked from commit 78d08834c0afe0be09e4ec071a6e6855aa18e2c8)

DB/Item: Fix text in Rune-Inscribed Parchment

Closes #17329 by tkrokli
(cherry picked from commit 8879545f21fe13650872358741b687a524cf8cb9)

DB/Quest: improve chaining for "The Ashenvale Hunt" quests

Closes #17323 by SnapperRy
(cherry picked from commit d034eedb811912546025d11a5e9335bcd6600464)

DB/trinity_string: wrong string about character customization + minor fix

Closes #17306 by lyn1337
(cherry picked from commit 0951e559ebe6b76abdfef55619244578d9917002)

DB/Quest: fix some completion/offer reward quest texts

Closes #17336 by SnapperRy
(cherry picked from commit e9025036b9848a5a684c57e3e066687c29fde321)

DB/Quest: add queststarters for "Regthar Deathgate"

Closes #17337 by SnapperRy
(cherry picked from commit 0b8921a0ef81fb7c4741248301b17a86fa0ffb69)

DB/Quest: fix chaining for "The Real Threat"

Closes #17338 by SnapperRy
(cherry picked from commit c9cb86d6c53ceb7331a1a5c1ff8a69f569cca426)

DB/Quest: fix repeatableness (or lack of) for some quests

Closes #17339 by SnapperRy
(cherry picked from commit b9f2e2a81b7f0a269da3a8f9597a4eca17899781)

DB/Quest: improvements for "Fool's Stout"

Closes #17340 by SnapperRy
(cherry picked from commit 4ec753dc50927e358a63a49a56cef7f5a72f41eb)
2017-01-13 00:07:43 +01:00
joschiwald 71ffdccb5a Core/Movement: enable item use and spell cast when dismounting
Remove error message and allow spell cast or item use from
mounted state on ground, especially when sitting on
a landed flying mount. Current behavior is that the player
will get the error message "You can't do that while moving"
when trying to cast a spell or pick up an item
while sitting on a flying mount after having landed.

By joschiwald, closes #6236

(cherry picked from commit 19aac66bc262a835cae288fc3d0ccdc8e93d0fb9)
2017-01-12 03:36:32 +01:00