[KongchangAI]
· 2 min read· 1,431 words

Open-Source WoW Pathfinding Fix Log: 1,332 Lines of Code Patch a Three-Year-Old Bug

Open-Source WoW Pathfinding Fix Log: 1,332 Lines of Code Patch a Three-Year-Old Bug

Open-source WoW pathfinding bugs trace to the mesh generation layer, not AI logic.

The article recaps Bilibili creator Da Fei Yu's full process of fixing pathfinding bugs in open-source World of Warcraft. Stuck dodging, wall clipping, floating, and missing mobs all stem from generation errors in terrain height queries and the navmesh. After setbacks like parameter audit misjudgments, the loss of 530 manual connections, and a wrong rounding direction, three changes sealed the bug chain: auto off-mesh connections, per-cell parameters, and round-up height conversion. The core lesson: suspect data generation before runtime logic.

Title

Open-Source WoW Pathfinding Fix Log: 1,332 Lines of Code Patch a Three-Year-Old Bug

Meta Description

Open-Source WoW server fix log EP3: the root cause of mobs stuck dodging, clipping through walls, floating mid-air, and never showing up lies in the navmesh generation layer. The Da Fei Yu team changed 27 files and added 1,332 lines of code, fixing the entire bug chain in three steps: auto off-mesh connections, per-cell parameters, and switching height conversion to round-up.

Article Content

Pathfinding bugs in Open-Source World of Warcraft have become something of a living fossil in the private-server community: a mob chases you halfway and then freezes in place, clips straight through a city wall, walks on thin air up into the sky, or the mob that's supposed to show up never appears at all. Bilibili creator "Da Fei Yu" (Big Fat Fish) reveals the full causes and fix path for this set of problems in "Server Fix Log EP3" — the essence is not that the AI logic is wrong, but that the terrain and navmesh are broken starting from the generation layer.

First finalized ruleset, August 23

Four Symptoms, One Root Cause

From the player's perspective, four types of failure are visible: mobs suddenly freezing mid-chase (known in the community as "stuck dodging"), clipping straight through walls, floating upward on thin air, and patrol mobs that never arrive — the last because their leash radius is only 30 yards while patrol points are 40 to 50 yards apart, out of reach, so they just stand still.

These four phenomena look scattered, but their root lies in the same set of systems: terrain height queries and the navmesh. The creator summarizes the upstream problems at the time of the August 5 fork into three categories of orientation errors: height queries search in all directions, counting the backs of walls and ceilings as standable floor; multi-layer terrain gets searched infinitely downward; settings allow passing through openings, pulling units directly underground; and triangles steeper than 60 degrees get culled outright, leaving holes in walls that mobs slip through.

NavMesh is the foundational data structure for game AI pathfinding, typically baked automatically from terrain geometry, abstracting walkable surfaces into a connected graph of triangles or convex polygons. When a mob chases a player, the pathfinding system runs an A*-like search on this graph and hands the path points to movement logic for execution. So once the mesh itself has holes, isolated islands, or incorrect faces, no amount of runtime logic changes can compensate — mobs either can't find a path and stand still, or misjudge a wall surface as floor and clip through. This is also why this article repeatedly stresses "suspect data generation first, runtime logic second": NavMesh is the intermediate layer between terrain and AI, and its quality directly sets the ceiling for upper-layer behavior.

Finalized Rules: Don't Delete Walls, Just Mark Slopes

On August 23, the first version of the ruleset was finalized, shifting the approach from "delete wrong faces" to "mark wrong faces." Walls and ceilings are no longer deleted but marked as steep slopes that block movement; short decorations only count as standable when real ground exists beneath them; movement endpoints always snap back to the mesh surface. The next day another sign bug was patched: the code took absolute values, so ceiling undersides were counted as walkable floor.

The real finalization waited until September 29. By September 16, this area had accumulated 27 changed files and 1,332 added lines.

There was simply no connected path in between

The Real Culprit Behind Stuck Dodging: Fragmented Mesh Islands

"Stuck dodging" has always been assumed to be an AI logic problem, but it isn't. The mesh was sliced into isolated islands: the mob stands on one island, the target is on another, and there is simply no connected path in between — no path found, which manifests as standing still.

There were two root causes: two height query miscalculations, plus generation parameters that fragmented narrow passages. The corresponding fixes are also two: first, automatic off-mesh connections to rejoin broken mesh; second, per-cell parameters, setting the radius of narrow passages and narrow stairs to one.

Off mesh link is a supplementary connection in the pathfinding system used to cross disconnected regions, commonly seen at jump points, portals, or between two separate meshes. When automatic baking can't join adjacent regions into one, developers manually place off mesh links so the pathfinding search can "jump" across. The loss of 530 manual connections in this article was so fatal precisely because these connections existed as patches in external files — once the generation pipeline stopped reading them, the mesh immediately reverted to isolated islands and stuck dodging recurred. Building the connections in as auto off mesh, produced automatically by the generator, essentially converts an easily lost external dependency into a reproducible generation artifact.

Parameter Audit and the Loss of 530 Connections

On October 14, a parameter audit was run, and the conclusions were a bit of a slap in the face: the team thought four configuration overrides were in effect, but they were fake; two failure attributions were wrong; and five cells were silently dropped, with not a single word in the logs.

Silently dropped, with not a single word in the logs

The next day was worse — when changing generation parameters, the off mesh input was forgotten, all 530 manual connections were lost, and stuck dodging immediately recurred. That same day, the team decided to build the connections directly into the generator, naming it auto off mesh, so it would no longer depend on external files.

Generator Rework: Rounding Replaced with Round-Up

On October 22, the generator was reworked, and one change looked tiny but had huge impact: height conversion switched from rounding to round-up. The reason is that rounding can undercount a step by one cell, and with the climb parameter at level 50, a single cell's difference is enough to break the entire pathfinding chain.

Height conversion changed to round-up

The climb parameter refers to the maximum height difference a unit is allowed to cross when baking the navmesh, usually measured in voxels or cells. When height queries discretize continuous terrain into cells, the rounding method directly changes step traversability: rounding may count a step as zero cells, causing the height difference between adjacent cells to exceed the climb threshold and breaking the pathfinding chain at that cell. After switching to round-up, steps are counted as at least one cell; though height may be slightly overestimated, real elevation differences are never missed. This kind of "one-cell difference" problem is very typical in voxelized baking, and it's also why many pathfinding bugs are hard to reproduce — it only triggers under specific step-height combinations.

Lessons for Server-Fix Developers

The most valuable takeaway from this fix isn't the specific parameters but the debugging order: suspect data generation first, runtime logic second. A surface symptom of "mob stops halfway through a chase" ultimately traced back to the absolute value in height queries, the mesh parameters of narrow passages, and the silent loss of external connection files. In the third log entry, the creator also recorded the failure process in full, including his own misjudgments in the parameter audit — this kind of "reverse retrospective" is of considerable value to developers likewise maintaining private servers or open-source projects.

Building connections into the generator, differentiating parameters per cell, and correcting the direction of height conversion — only with these three changes stacked together was this bug chain, seeping from the terrain layer into the AI layer, truly sealed off.

One-line Summary

The root cause of open-source WoW pathfinding bugs lies in the mesh generation layer, not AI logic.

Paragraph Summary

The article recaps Bilibili creator "Da Fei Yu"'s full process of fixing pathfinding bugs in open-source World of Warcraft. The four symptoms — stuck dodging, wall clipping, floating, and missing mobs — all stem from generation errors in terrain height queries and the navmesh: omnidirectional height searches, infinite downward search through multi-layer terrain, allowing passage through openings, and culling triangles steeper than 60 degrees. The fix approach shifted from "deleting walls" to "marking steep slopes," and went through repeated setbacks including parameter audit misjudgments, the loss of 530 manual connections, and a wrong rounding direction in height conversion, before finally sealing the bug chain with three changes: building connections into the generator, differentiating parameters per cell, and switching from rounding to round-up. The core lesson is that debugging should start with data generation, then runtime logic.

#World of Warcraft#pathfinding#NavMesh#open-source game server#bug fixing
Share:

Related articles