[odamex-bug-reporter] [Bug 1202] Scythe2 map28 crash

  • From: odamex-bugtracker@xxxxxxxxxx
  • To: odamex-bug-reporter@xxxxxxxxxxxxx
  • Date: Sat, 22 Oct 2016 20:14:23 +0000

http://odamex.net/bugs/show_bug.cgi?id=1202

--- Comment #1 from Alexander Mayfield <alexmax2742@xxxxxxxxx> ---
Created attachment 549
  --> http://odamex.net/bugs/attachment.cgi?id=549&action=edit
NULL shootthing on level load, preventing crashes.

As it turns out, this is actually due to clientside puff prediction.

P_SpawnPuff is not only called when somebody fires a weapon, but also for
Revenant fireball trails.  MAP28 of Scythe 2 contains several dozen revenants
at the start of the map, and with the map just switched, shootthing is a wild
pointer.  Thus, a crash happens when shootthing is examined to determine if
puffs should be rendered clientside.

This patch ensures that shootthing is set to NULL on level load.  This appears
to fix the crashing problem.  However, knowing that P_SpawnPuff can be called
for things other than players shooting weapons, there might be a better way to
handle clientside puff prediction.  After all, shootthing is set in a grand
total of four locations:

- P_AimLineAttack
- P_LineAttack
- P_RailAttack
- P_AimCamera

None of which are called by a Revenant.  Thus, checking shootthing in
P_SpawnPuff is problematic, since in the case of a Revenant missle whatever is
in that variable is completely unrelated to the revenant - I suspect it
contains whatever the last shootthing invocation was.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Other related posts: