cmangos / issues

This repository is used as a centralized point for all issues regarding CMaNGOS.
179 stars 48 forks source link

Detour/Pathfinding - Shallow Water/Exiting/Entering Water #2986

Open al3xc1985 opened 2 years ago

al3xc1985 commented 2 years ago

Bug Details

As the tittle say, this creatures can't come out of water to attack u

Greymist Coastrunner https://classic.wowhead.com/npc=2202/greymist-coastrunner Greymist Raider https://classic.wowhead.com/npc=2201/greymist-raider

More Examples

  1. npc=4818 from water into water, getting stuck

Expected behavior

No response

Suggested Workaround

No response

Crash Log

No response

Core SHA1 Commit Hash

49c8ce69c569622f24b77f3cd84df33da9cb4155

Database SHA1 Commit Hash

7e3d53e065cf52005e7105d841dd4a67f684216b

Operating System

windows 10

Client Version

3.3.5a (Wrath of the Lich King)

Grz3s commented 2 years ago

give me guid of creature u checked just tested both 2201 & 2202 ..and they both works fine for me... anyone can confirm?

AnonXS commented 2 years ago

Data looks fine for the Greymist Npcs:

grafik

i was not able to reproduce it so needs better step guid


But sadly yes, general issue with mobs going In/Out of water, nomatter the Inhabittype or UnitFlags they have (sometimes these are wrong too though always check), sometimes it works fine other times not.

E.g why that guy has MMAP Ignore (extraflag) which also does not help seemingly grafik

or .go c id 513 grafik

or that one grafik

or Object GUID is: Creature (Entry: 16349 Guid: 99434) grafik


AnonXS — 15/04/2022 opposite water issue with 4300258 he starts in water, walks out and never can go into shallow water again

al3xc1985 commented 2 years ago

37854 & 37862

also Pigmy Tide Crawler 38516 & 38512 they are in the same spot

al3xc1985 commented 2 years ago

Tide Crawler 38564 & 38543 38568

Also I see 38568 that sometimes try to reach a path BUT he goes on a very long way, and that path is so long to exit the water that he evades.

If u put one step in water he can calculate a direct path to you and he can come to you, and than exit water. This behaviour is same to all targets

I have to tell u that I play a hunter class for testing

al3xc1985 commented 2 years ago

Also dunno if this is related to smae problem, but the owls in the cave from middle of teldrassil, they have spot where if they reach they get the same simptom. I mena on the middle of the bridge they get stuck and start to evade, only if u go near them u can attack them...

If this is related just let me know and I shall provide SS and guids, but any owl that get's on the bridge he has like a 75- 80 % chance to get stuck in the middle of ANY bridge

AnonXS commented 1 year ago

Recheck cases displayed here.

al3xc1985 commented 1 year ago

I will check them back and come back with results

al3xc1985 commented 1 year ago

image

now it has a different problem. u aggro them and they just stay in place. u are outside the water and they are in the water.. if u enter the water they will come to u straight and get out with u from the water they go back normally back to last point when evade.. all perfect

only problem is that they get stuked and do not come to your out of water until u enter water

AnonXS commented 1 year ago

I do not have this issue in tbcmangos. only their movement is shitty, they can enter/exit water.

Grz3s commented 1 year ago

wotlk has no issues also... 1 2 3

al3xc1985 commented 1 year ago

hmm curious I did with a fresh new db release. Maybe something is wrong with my core. until new evidence I shall close this (if there is any and I really hope there is no more problem with this)

AnonXS commented 1 year ago

Just deployed a new 1.12.1 (Classic) server in March 2023 and I can confirm this behavior in the Horde Starting area around Sen'Jin Village. The Crawlers and Makura in the water cannot find a path to the player most of the time and run sideways looking for a way to get to the player. Player swim movement is also wrong, the player does not swim up, but "jumps" through the water when travelling upwards.

it can also be related to the extraflag: walk in water. - so from what i see is, it works fine, crabs might swim during chasing but not OOC, they can go in and out of water. but if you swim into the water they cant reach you and start chasing around, when they should infact go idle and into evade mode as player is unreachable. - different issue from what is described here.

New Issue: how should crabs behave when they chase someone in water, can they swim then?

AnonXS commented 1 year ago

Creature (Entry: 4807 Counter: 4800061) DBGuid: 4800061.

grafik

grafik

Novivy commented 1 year ago

It happens to all creatures in water, unless you add the ExtraFlag 0×00004000 CREATURE_EXTRA_FLAG_MMAP_FORCE_DISABLE to it.

For info, the creature in the example have the following ExtraFlags: 0×00008000 CREATURE_EXTRA_FLAG_WALK_IN_WATER, InhabitType is 3 Both Ground And Water Movement

I tried with HD and non HD maps extracts, same result.

https://user-images.githubusercontent.com/50490687/228079337-58d32423-fcc7-494e-84da-67327a09356a.mp4

  1. .gm off .gm visible on
  2. .go crea 38516 (entry 2231)
  3. Stand 10 yards from the shore and target the creature in water
  4. .damage 1
  5. Creature won't move
r4d1sh commented 1 year ago
Clickable - Suggest as a temporary (or permanent) solution ```diff diff --git a/src/game/MotionGenerators/PathFinder.cpp b/src/game/MotionGenerators/PathFinder.cpp index 19661d5..5a065f3 100644 --- a/src/game/MotionGenerators/PathFinder.cpp +++ b/src/game/MotionGenerators/PathFinder.cpp @@ -630,7 +630,7 @@ void PathFinder::BuildPointPath(const float* startPoint, const float* endPoint) m_pointPathLimit); // maximum number of points } - if (pointCount > 2 && sWorld.getConfig(CONFIG_BOOL_PATH_FIND_OPTIMIZE)) + if (dtStatusSucceed(dtResult) && pointCount > 2 && sWorld.getConfig(CONFIG_BOOL_PATH_FIND_OPTIMIZE)) { uint32 tempPointCounter = 2; @@ -692,6 +692,14 @@ void PathFinder::BuildPointPath(const float* startPoint, const float* endPoint) } } + if (pointCount == m_pointPathLimit) + { + DEBUG_FILTER_LOG(LOG_FILTER_PATHFINDING, "BuildPointPath FAILED! path sized %d returned, lower than limit set to %d\n", pointCount, m_pointPathLimit); + BuildShortcut(); + m_type = PATHFIND_SHORT; + return; + } + if (pointCount < 2 || dtStatusFailed(dtResult)) { // only happens if pass bad data to findStraightPath or navmesh is broken @@ -703,14 +711,6 @@ void PathFinder::BuildPointPath(const float* startPoint, const float* endPoint) return; } - if (pointCount == m_pointPathLimit) - { - DEBUG_FILTER_LOG(LOG_FILTER_PATHFINDING, "BuildPointPath FAILED! path sized %d returned, lower than limit set to %d\n", pointCount, m_pointPathLimit); - BuildShortcut(); - m_type = PATHFIND_SHORT; - return; - } - // first point is always our current location - we need the next one setActualEndPosition(m_pathPoints[pointCount - 1]); ```
Ohswin commented 11 months ago

I have observed this issue in the lake above farstrider enclave in the ghostlands. The gosts in the water evade your attacks when attacking from outside the water. Once inside the water they act like normal.

tbc-mangos commit: 46ce862172aee1d1ff969f33e20374c3c869d40b tbc-db commit: 5914db5509a28a4ead85a117096cb18bf0aad613

Arnibou commented 6 months ago

On tbc-mangos and it doesn't only do it in combat, during an escort if the npc has to cross the water, he can't find the way!

Example quest: Vorsha the Lasher (id: 6641), Muglash can't find the way to the other side when he has to cross the water, he makes a big detour to the water's edge.

al3xc1985 commented 6 months ago

@cyberium we need you, help us wise one! /baw We also got cookies for ya! :)