Commit Graph

165 Commits

Author SHA1 Message Date
Shauren
175424d3cb Core/Misc: Reduce differences between branches 2025-09-27 23:25:37 +02:00
Shauren
aaa6e73c8c Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
(cherry picked from commit d791afae1d)
2023-08-15 20:10:04 +02:00
Shauren
b7287e85e4 Core/Misc: Fixed deprecation warnings for c++20
(cherry picked from commit ba9bbbc9d0)
2023-08-12 14:24:24 +02:00
Shauren
b1a94bf94c 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
2022-04-03 22:36:49 +02:00
Shauren
62c2ceaff2 Core/Units: Rename AnimationTier to AnimTier for consistency with master branch 2022-03-24 20:38:55 +01:00
Giacomo Pozzoni
9fe9dc087b 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>
2021-06-06 17:51:00 +02:00
ccrs
303e01c834 Core/Movement: remove redundant method MovementGenerator::NotifyAIOnFinalize and use existing Finalize - MovementInform implementation
6fde051e4e follow up
2021-06-03 15:01:47 +02:00
Ovah
31abdc6ecf Core/Movement: add optional velocity argument for MoveLand and MoveTakeoff (PR #25516) 2020-10-01 02:50:45 +02:00
NoName
dad187615d 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>
2020-09-08 17:12:52 +02:00
Keader
141d3d2718 Core/MotionMaster: Do not generate path to MoveLand 2020-09-07 13:22:14 -03:00
Ovah
cfd63c350f 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)
2020-04-17 21:13:18 +02:00
jackpoz
67f28adaf7 Core/Movement: Add safety check to avoid C++ undefined behaviour 2020-04-08 14:15:49 +02:00
Eridium
0e2342c169 Core/Movement: Formation Rewrite (#24379)
* Core/Movement: Formation Rewrite

* Add a missing include

* fixed another warning

* meh

Co-authored-by: Ovahlord <Ovahlord@users.noreply.github.com>
Co-authored-by: Ovah <dreadkiller@gmx.de>
2020-04-04 15:08:42 +02:00
Giacomo Pozzoni
6fde051e4e 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
2020-03-17 19:58:07 +01:00
NoName
40542f01e3 Core/Movement: Implement MoveSplineFlag::Enter_Cycle (#24049)
by xvwyh
#22448
2020-02-28 19:03:52 +01:00
ratkosrb
6176ce92ea 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 <giacomopoz@gmail.com>
2020-02-16 13:36:56 +01:00
Aokromes
ed93932537 New year
Say bye bye to every year changing dates
2020-01-02 06:25:50 +01:00
Giacomo Pozzoni
4ccf01de39 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
2020-01-01 16:28:33 +01:00
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