Murloc Cult

Back to the archive

Long trips: walk in legs instead of giving up

The real culprit behind “impossible paths”: the core's path smoothing stops at 74 points 4 m apart. Beyond roughly 300 m of walking, the path was declared impossible. Crashtroller now moves in legs of about 200 m along the navmesh corridor.

Commit
457f8de
Build
Build success (1 min) · Target worldserver

Analysis

In PathGenerator::BuildPointPath, FindSmoothPath fails as soon as the smoothed path exceeds MAX_POINT_PATH_LENGTH (74 points spaced by SMOOTH_PATH_STEP_SIZE = 4 m). The core then builds a shortcut and flags the path PATHFIND_NOPATH. Turning in a quest at the camp from the familiars' territory became “impossible”.

Fix

  1. If the smoothed path fails, compute the corner path (SetUseStraightPath(true) → findStraightPath): same polygon corridor, only the turning points.
  2. Pick the farthest corner within 200 m of cumulative walking.
  3. Smoothed path to that corner, which follows the terrain (no floating over a hill), then recompute on arrival.

The fallback to a reachable neighbouring point (NPC inside a building) stays as a last resort.