clang-check warns that if `N_bitmaps <= 1`, then
`DiskBitmapHeader_d1_read` will never run, but `bmh.wh_extra` will be
read in `bitmap_read_d1`. Reorder the logic to return early if there
are no bitmaps.
clang-check warns about a potential binding a reference to nullptr in
the case that a segment has 0 sides. While this is silly and
impossible, a related failure mode would occur if vm_vec_dot never
indicated a side as good. This should be impossible, but the test for
nullptr is cheap, so add it to silence the checker.
The game has an alternative level file format that is not normally used.
This format can enable seismic events on a timer, independent of reactor
countdown or earthshaker usage. However, this feature is not reset on
loading a regular level after playing a level with the timer-driven
seismic events, so the regular level shakes according to the timer, even
though its author never designed it to do so.
Fix that by resetting the timer state to 0 before loading a regular
level.
Level seismic events and Earthshaker seismic events start with different
intensities, but share everything afterward. Move the common parts to a
function.
When Next_seismic_sound_time is non-zero, a seismic sound is playing.
When Next_seismic_sound_time is zero, no sound is playing. Use this to
eliminate the explicit tracking variable Seismic_sound_playing.
Commit dc79bb8e4a intended to clean up processing guidebot messages,
but accidentally allowed the guidebot to report certain status messages
before its cage was opened. Normal missions still do not report these
messages, but some custom levels do.
Reported-by: ziplantil <https://github.com/dxx-rebirth/dxx-rebirth/issues/438>
Fixes: dc79bb8e4a ("Remove hack for bypassing buddy time restriction")
`explode_badass_player` can pass an OBJ_PLAYER, not an OBJ_WEAPON, as
`obj_explosion_origin`. Using `get_weapon_id` on a non-weapon is wrong
and provokes a diagnostic. The test tries to check if the passed object
is _not_ a flash missile. Players are not flash missiles, so maintain
the intended semantics by treating non-weapons as not-flash-missiles.
Reported-by: Johnsondr80 <https://github.com/dxx-rebirth/dxx-rebirth/issues/437>