Commit Graph

132 Commits

Author SHA1 Message Date
Sorikoff
c2f2db08aa Allow walk when chasing (#23069) 2019-02-25 09:36:36 +01:00
ccrs
9695c3d46d Core/Movement: 9080e7863c followup
not the desired optimization I was aiming at, ty Shauren
2019-01-10 23:02:43 +01:00
ccrs
9080e7863c Core/Movement: correct logic wrongly ported in 2a84562dc8
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
2019-01-10 22:51:47 +01:00
Treeston
fcfcb0eb6f Happy New Year, folks. It's 2019! 2019-01-01 15:45:25 +01:00
Treeston
ead439fbd6 Core/Movement: Add some extra assertions to MotionMaster to catch issues like #22444 earlier in the future. 2018-10-02 19:53:55 +02:00
ccrs
982643cd96 Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).
2018-06-03 10:06:57 -07:00
ccrs
7118806231 Core/Movement: use helpers for validation 2018-04-23 23:35:31 +02:00
ccrs
2a45418032 Core/Movement: move MoveSplineInit (#21857)
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.
2018-04-23 20:33:14 +02:00
ccrs
bcab5bc4e7 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
2018-04-20 12:46:24 +02:00
ccrs
f9914caefc Core/Misc: movement header cleanup 2018-04-19 13:31:39 +02:00
Treeston
2a84562dc8 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.
2018-04-06 18:09:55 +02:00
Treeston
ebc96af6bb Core/Object: Bump hover delta handling on nearpoints downstack into GetNearPoint2D (from movement generators); functionality should be unchanged 2018-04-01 18:27:29 +02:00
Treeston
4692e10ca2 Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good. 2018-04-01 13:52:36 +02:00
Shauren
2baa81065b Core/Movement: Fixed creature hover
Closes #15177
2018-03-08 23:13:51 +01:00
tkrokli
f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
Jeremy
e42903ec16 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
2017-12-29 22:32:07 +01:00
Kittnz
cd88406de9 Core/Movement: Add MovePoint with facing (#20779) 2017-12-23 16:12:24 +01:00
Golrag
95456ab5d8 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.
2017-12-14 16:56:30 +01:00
Shauren
e977bb4c4d Core/Misc: Fixed nopch MSVC build 2017-12-11 22:15:52 +01:00
ccrs
e10d7dd45c 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
2017-11-06 22:19:23 +01:00
ccrs
eb2769996f Core/Movement: 7fff83d675 followup
since MOTION_SLOT_IDLE cannot be expired, signal path done and behave like IdleMotionGenerator
2017-08-12 19:43:37 +02:00
ccrs
cd4775420a Core/Movement: 7fff83d675 followup
remove home position set from creature PauseMovement, and use it when necessary
change log level on DelayedDelete
2017-08-12 17:35:46 +02:00
ccrs
7fff83d675 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)
2017-08-12 01:40:25 +02:00
ccrs
4f43f4d72f Core/Movement: ee2d7c1d53 followup 2017-08-08 20:29:30 +02:00
ccrs
40903dcd65 Core/Movement: PropagateSpeedChange should only be called on the top (current active) movement generator 2017-08-08 19:49:12 +02:00
ccrs
ee2d7c1d53 Core/Movement: add new helper that cleans the referenced MovementSlot 2017-08-08 19:35:13 +02:00
ariel-
85a7d5ce9a Core: ported headers cleanup from master branch 2017-06-19 23:20:06 -03:00
ariel-
ce3787f190 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
2017-06-01 02:29:20 -03:00
ccrs
46221b6dc1 Core/Movement: FormationMovementGenerator
Use own movement generator for creatures following on a formation.
First step of implementation, huge room for improvement.

Closes #19422
2017-04-09 14:13:29 +02:00
ccrs
21b8c4997a [3.3.5] Core/Movement: MotionMaster & MovementGenerators cleaning (#19361) 2017-04-07 21:35:23 +02:00
ccrs
9be7f5f57b Core/Movement: 96f4c7c followup 2017-03-25 13:17:29 +01:00
ccrs
96f4c7c187 Core/MotionMaster: cleanup use of _expireList
And restore broken _cleanFlag check/use on update (eca3645d8b)
2017-03-25 12:33:39 +01:00
ccrs
fce974c3b3 Core/Movement: cleanup MovementGeneratorType 2017-03-25 12:02:25 +01:00
Chaouki Dhib
a1f2f30c14 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.
2017-03-23 00:43:04 +01:00
ariel-
2e68736afc Core/Movement: Corrected all speed checks after 23b6991273
Ref issue #19210
2017-02-28 15:18:09 -03:00
xinef1
b3f04ec157 Added some missing SetFallInformation calls (#19121)
Fixed HP drop bug on zeppelins
Fixed possible packet relocation problems on huge transports
2017-02-13 21:05:32 +01:00
treeston
4f842d91e1 Revert "Core/Movement: Added support to change orientation in MovePoint function (#18893)"
This reverts commit bc95fce93f.

See #18893.
2017-02-04 16:43:32 +01:00
Keader
bc95fce93f Core/Movement: Added support to change orientation in MovePoint function (#18893) 2017-02-04 12:14:28 -03:00
Rushor
a3c6880579 Revert "[3.3.5][master] Core/Movement: Smooth movement #13467 (#18020)" (#18888)
This reverts commit 28050f338d.

Conflicts:
	src/server/game/AI/SmartScripts/SmartAI.cpp
	src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
2017-01-20 14:16:47 +01:00
tkrokli
6a51a88767 Update Copyright notice for 2017
Happy new year!
2017-01-02 19:52:45 +01:00
Chaouki Dhib
eca3645d8b Core/Movement: minor MotionMaster refactor (#18367) 2016-12-01 23:45:32 +01:00
Riztazz
28050f338d [3.3.5][master] Core/Movement: Smooth movement #13467 (#18020)
Implement smooth movement for all waypoint pathing and escortai
2016-11-24 23:31:10 +00:00
ccrs
c2592506ad rerenaming 2016-10-07 14:25:58 +02:00
ccrs
91d7c1805b whatever 2016-10-07 12:07:56 +02:00
ccrs
960f75ff4b rerename 2016-10-06 22:04:37 +02:00
ccrs
46b099e727 fix build 2016-10-06 18:17:52 +02:00
ccrs
f32f38a91c Core/MotionMaster: cleanup, reordering and renaming 2016-10-06 17:53:35 +02:00
treeston
d3214a0012 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". 2016-09-21 16:22:12 +02:00
treeston
2170541a51 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.
2016-09-20 20:19:15 +02:00
treeston
6d00d3f283 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. 2016-09-20 00:37:36 +02:00