Commit Graph

147 Commits

Author SHA1 Message Date
jackpoz
862d47394b 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
2019-12-27 17:28:09 +01:00
Giacomo Pozzoni
8f94c9ef6b Core/Movement: Fix stunned falling units freezing the client (#24000) 2019-12-27 16:33:16 +01:00
ccrs
c9c6871659 Core/Movement: prevent any Initialize queue till AddToWorld is signaled 2019-10-23 03:28:57 +02:00
ccrs
5d056f37c7 Core/Movement: d033032 followup
ty jackpoz
2019-10-22 15:48:00 +02:00
ccrs
bc507209a7 Core/Movement: d033032 followup
ty jackpoz
2019-10-21 16:49:25 +02:00
ccrs
d033032d33 Core/Movement: delay movement update in MotionMaster until its owner signals AddToWorld
ref #23199
closes #23876
2019-10-21 13:55:23 +02:00
jackpoz
84937337da Revert "Core/Movement: Fix a crash on login"
This reverts commit 9941b4c2ed.
2019-10-20 12:25:14 +02:00
jackpoz
9941b4c2ed Core/Movement: Fix a crash on login
Fix a crash in MotionMaster happening when logging in with an aura of type SPELL_AURA_MOD_CONFUSE
2019-10-19 23:05:22 +02:00
ccrs
bec52dba3d Core/Movement: add missing parenthesis on MotionMaster::Size
pretty sure this can cause unexpected behaviour
2019-07-09 15:25:25 +02:00
ccrs
2b78c70810 Core/Movement: move DelayedAction into MotionMaster and add a couple defines 2019-05-19 11:38:10 +02:00
Shauren
3e9239a1e5 Core/Movement: Use correct root check 2019-05-10 23:32:57 +02:00
Shauren
99a9129a72 Core/Movement: Prevent rooted units from falling
* Fixes a client freeze

Closes #23042
2019-05-10 23:30:50 +02:00
ccrs
6e011c974d Core/Movement: replace multiset::find with std::find in MotionMaster
same reasoning as 11de6b5
Container's find uses the defined custom comparator
2019-04-17 00:06:06 +02:00
ccrs
11de6b5f86 Core/Movement: implement and use new remove method in MotionMaster
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
2019-04-16 23:29:04 +02:00
Sorikoff
dbadb6369c Core/Movement: Allow using walk when chasing v2 (#23073)
* Allow walk when chasing
2019-03-02 15:04:01 +01:00
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