New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creature flee speed when "run-away" triggers is too fast! [25$] #21899
Comments
Npcs have only 2 speeds, walking speed and run speed, on '%s attempts to run away in fear' they run. |
This is still valid issue, they should run but be slowed by 33%, current implementation sets the speed properly to 66% but before the movement is initialized it resets back to default value in one of the functions, iirc it was CombatStop or attackStop |
Could you link the code where the speed is changed? |
https://github.com/TrinityCore/TrinityCore/blob/master/src/server/game/Movement/MotionMaster.cpp#L627 this gets called which does this: Edit: Speed reduction is in UpdateSpeed function in unit.cpp |
@ccrs could you take a look to this? |
Broken since forever, not related to ccrs commits, i think it was one of treeston changes to AttackStop but i could be wrong |
UpdateSpeed properly sets the reduced speed, movegen does not honor it. Not going to address this until after #21888. |
It does honor it, logic is messed up in AttackStop which is called just before distract generators are called which brings old movement speed :P |
10$ bounty added. |
@Riztazz - to give you an update |
@Riztazz how about something like jackpoz@b931fc9 ? |
I noticed for some spawns when they flee they doesn't have the UNIT_FLAG_FLEEING
2nd case:
The npc get UNIT_FLAG_FLEEING (0x800000) only if there's no npc around to call for help, if there's a friendly npc that could be call for help the fleeing npc will not get UNIT_FLAG_FLEEING |
@jackpoz I removed this line: https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Entities/Unit/Unit.cpp#L5580 and the issue get fixed for npcs that doesn't stop movement to cast spells like npc Entry: 430 (For this casters if they are not in chasing mode they will use the correct fleeing speed, otherwise the speed will not be reduced) |
I opened a PR at #23997 |
862d473 fixed one of the many issues related to fleeing and searching for assistance |
Remaining issues:
|
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
I was under the impression that the speed reduction was dependent on the health of the npc, so that if they're hit after they begin fleeing at ~15% they will slow down further. That's based on research from someone else though so I've got no videos to back it up with. |
* 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
Description: Creature flee speed when "run-away" triggers is too fast!
When fighting mobs that run away when under a certain health level, more often than not they run away at 100%+ full speed. Sometimes they "hobble"/walk away as intended, or do the running animation but look snared.
Current behaviour: Runs away at 100% speed
Mob runs away too quickly to rally nearby enemies for support.
Expected behaviour:
Mob speed should be closer to that of walking than full on sprinting AFAIK. This does not feel blizzlike.
Steps to reproduce the problem:
Branch(es):
3.3.5
TC rev. hash/commit:
TrinityCore rev. 88130d8 2018-03-29 20:18:52 +0200 (3.3.5 branch) (Win64, R
elease, Static)
Using SSL version: OpenSSL 1.1.0h 27 Mar 2018 (library: OpenSSL 1.1.0g 2 Nov 2
017)
Using Boost version: 1.65.1
Using MySQL version: 5.6.39
Using CMake version: 3.11.0
Compiled on: Windows 10.0.16299
Automatic database updates are disabled for all databases!
Worldserver listening connections on port 8085
Realmlist (Realm Id: 1) configured in port 8085
VMAPs status: Enabled. LineOfSight: 1, getHeight: 1, indoorCheck: 1
MMAPs status: Enabled
maps directory located in data/maps. Total size: 252191207 bytes
vmaps directory located in data/vmaps. Total size: 588247501 bytes
mmaps directory located in data/mmaps. Total size: 2152621724 bytes
Using enUS DBC Locale as default. All available DBC locales: enUS
Using World DB: TDB 335.64
Operating system: Windows 10
*** Tried googling this issue and searching the issues on here, found nothing that seemed related. ***
The text was updated successfully, but these errors were encountered: