dxx-rebirth/similar
Kp a2d03df7aa Prevent treating dying players as weapons
Function `object_create_explosion_sub` is supposed to be given a weapon
and an object on which to explode it.  However, the original game abused
`object_create_explosion_sub` by also calling it from
`object_create_badass_explosion`, which can be called from
`explode_badass_object`, which can be called from
`explode_badass_player`.  Chained together, this lets
`object_create_explosion_sub` check the weapon ID of a dying player,
which is not a valid operation.  This causes a diagnostic from
`get_weapon_id`.  Add an explicit test that the object is a weapon so
that non-weapons do not cause a diagnostic.

Reported-by: ryusei117 <https://github.com/dxx-rebirth/dxx-rebirth/issues/302#issuecomment-272048330>
Analyzed-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/302#issuecomment-272710279>
2017-01-28 18:12:21 +00:00
..
2d Make grs_bitmap::bm_flags private 2017-01-15 00:03:13 +00:00
3d Factor out point_list setup 2017-01-01 00:45:45 +00:00
arch Pass active palette to ogl_loadtexture 2017-01-15 00:03:13 +00:00
editor Create robot_create function and use it 4x 2017-01-22 17:56:50 +08:00
main Prevent treating dying players as weapons 2017-01-28 18:12:21 +00:00
misc Fix failure to unmap custom hogs 2016-12-17 18:39:18 +00:00