Murloc Cult

Back to the archive

Approach and melee: Crashtroller walks into range, shoots, then strikes on contact

Two combat bugs found with the debug mode: the core's chase did not move the player, and melee was never enabled after shooting.

Commit
2bf59b3
Build
Build success (1 min) · Target worldserver

Bug 1: standing still facing a boar 77 m away

The core's chase generator (ChaseMovementGenerator) stops if the target is not already the unit's “victim” (HasLostTarget). A player does not attack from 77 m. Fix: the approach follows the path computed on the navmesh, to 24 m (shooting range) or to contact for melee; the attack starts only once in range.

Bug 2: on contact, no more hits

The target was already the “victim” through the ranged attack, so Attack(target, true) was never called again: no melee. Fix: on contact, auto shot is interrupted and melee forced (UNIT_STATE_MELEE_ATTACKING); when moving away, back to shooting.

Also: target search now strictly honours its radius.

Approach and melee: Crashtroller walks into range, shoots, then strikes on contact — Murloc Cult