Previously, SConstruct tested whether static_assert worked with trivial
constant expressions. Extend the test to more complicated expressions
like the ones used in the program.
Replace the typedef based approach with an inline enum to avoid warnings
about unused local typedefs.
Allow use with compilers that lack working static_assert or that cannot
accept complicated expressions. Add a non-checking definition that uses
the input parameter. This prevents warnings when types or constants are
used only for the static_assert.
When static_assert is a macro, it must have two arguments as seen by the
preprocessor. Add an identity mapping to the native case to enforce
this, and fix up all the sites that break with the new rule.
Only respawn when the player presses a fire key/button (primary,
secondary, or flare). Only clear primary, second, flare, and bomb when
respawning. This allows dead players to use the automap or change their
camera views.
This is a necessary step to flushing only the firing inputs on respawn,
as requested by Mako88 in
<https://github.com/dxx-rebirth/dxx-rebirth/issues/104>. Currently,
inputs are flushed again by the activation of the game window, so
respawn still flushes all inputs.
#1 0x00005555555cee19 in game_flush_inputs () at similar/main/game.cpp:374
#2 game_handler (event=...) at similar/main/game.cpp:1114
#3 0x0000555555576113 in window_send_event (wind=..., event=...) at common/arch/sdl/window.cpp:208
#4 0x000055555557627b in WINDOW_SEND_EVENT (file=0x5555556dc126 "common/arch/sdl/window.cpp", e=0x5555556dc141 "EVENT_WINDOW_ACTIVATED", line=179, event=..., w=...) at common/include/window.h:111
#5 window_set_visible (w=..., visible=visible@entry=1) at common/arch/sdl/window.cpp:179
#6 0x00005555555e90f5 in window_set_visible (visible=1, wind=<optimized out>) at common/include/window.h:90
#7 DoPlayerDead () at similar/main/gameseq.cpp:1479
#8 0x000055555563ed65 in dead_player_frame () at similar/main/object.cpp:1486
#9 0x00005555555cf4df in GameProcessFrame () at similar/main/game.cpp:1329
#10 game_handler (event=...) at similar/main/game.cpp:1157