VortexQuake2 / Vortex

Quake 2 Vortex. vrxcl/revival.
http://q2vortex.com
GNU General Public License v2.0
15 stars 17 forks source link

Tank stuck walking in-place after death #199

Closed Vortex-Quake2 closed 1 year ago

Vortex-Quake2 commented 1 year ago

Per title, tank (monster) will occasionally get stuck walking in-place after death. Somewhat rare in occurrence, but most often seen in invasion with fire totem and other summons that can rapidly kill the tank. Important factors to consider:

  1. Appears to only affect world-spawned monsters. I have personally only seen this bug in Invasion mode.
  2. Monster appears to be dead based on lack of ID/HUD data.
  3. Monster walks in-place (continuous repeat of walking frames) and is unresponsive.

Based on the available data, I suspect this is a bug with the pain function. Comparing tank's pain function to others, the only obvious difference with other monsters is that the tank ends its pain animation with a call to tank_walk instead of run function.

After code review, I don't see any obvious reasons why this bug should occur, but I'm leaving this one open in the hopes someone can reproduce the bug reliably, making it far easier to get to the root cause.

Vortex-Quake2 commented 1 year ago

Really tough one to find, but easy to fix. Just had to move DEAD_DEAD check in drone_ai_walk below the M_MoveToGoal call.