Check if the cockpit window textures are still valid when reusing the
previous cockpit data in cockpit_decode_alpha.
This fixes a crash when leaving the graphics options menu while in
the game with cockpit visible, since that calls
ogl_smash_texture_list_internal which invalidates all textures.
Add a comment in the #include directive to hide it from the PCH scanner,
since this file should not be included in the PCH. It is only used in
one file, and it is included under special circumstances. In
particular, it is included while inside a namespace.
segment inherits unique_segment, so unique_segment members can be
referenced from an instance of segment. Eventually, segment will be
removed. Adjust references to go through unique_segment to support this
change.
segment inherits unique_segment, so unique_segment members can be
referenced from an instance of segment. Eventually, segment will be
removed. Adjust references to go through unique_segment to support this
change.
segment inherits unique_segment, so unique_segment members can be
referenced from an instance of segment. Eventually, segment will be
removed. Adjust references to go through unique_segment to support this
change.
segment inherits unique_segment, so unique_segment members can be
referenced from an instance of segment. Eventually, segment will be
removed. Adjust references to go through unique_segment to support this
change.
gcc and clang disagree about how to disambiguate when an identifier is
both a typename and a member. Avoid the disagreement by renaming the
member.
Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/issues/532>
This was a leftover from an earlier prototype. gcc-7 warns about it,
but gcc-8 and later silently allow it. Remove it to fix the gcc-7
build, since it is not needed.
Reported-by: Kieltux <https://github.com/dxx-rebirth/dxx-rebirth/issues/531>
Fixes: ec6a78c481 ("Use enum class for marker index types")
Various sites assign GM_GAME_OVER to Game_mode, but no sites test for
it. Its only value would be to clear out other flags, but that can be
done by clearing Game_mode.
In the original code there was a 'Hack to keep sounds from building up...'
which changed a non-forever linked sound to a non-linked sound. Therefore
the forever flag wasn't needed in the demo files. The commit
4a98e796ab removed the hack, which caused
non-forever sounds to start looping on demo playback.
This commit restores the hack as far as demo files are concerned.
Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/477>
Fixes: 4a98e796ab ("Prevent stacking weapon rotation sounds")
Descent tracked hoard orbs by borrowing the player's proximity bomb
slot. Commit 829e95b6f8 moved proximity
bomb tracking to its own slot, but failed to update the player
death/deres logic accordingly. This caused multiple inconsistencies
when a player was killed in hoard mode:
- The killed player saw the orb drop as expected.
- The killed player _also_ kept the orb in inventory after respawn,
because the counter was not reset.
- Other players saw no orb drop.
Fix the inappropriate retention by resetting the orb count in
init_player_stats_new_ship. Fix the inappropriate failure to drop by
adding a new unconditional field to the player death/deres message. In
hoard games, use it to pass the orb count. In other games, ignore it.
Fixes: 829e95b6f8 ("Separate hoard/proximity tracking")
Reported-by: snytek <https://github.com/dxx-rebirth/dxx-rebirth/issues/526>
The keys are always enabled, so there is no need to show them here.
Non-fullscreen users already dedicate space to the key graphic, so
nothing can be saved by adding a special case for those viewing modes.
Instead of a generic "-no title-", insert the time of the save. This
conveys some information to users, who may find it helpful for
distinguishing individual saves.
Save menus have a non-selectable first element used to allocate extra
space for the save game's embedded screenshot. The memorized save game
slot failed to account for this, causing the game to suggest a slot one
less than the last used slot. Attentive users could override the
suggestion, but the game should suggest the correct slot automatically.
Reported-by: ziplantil <https://github.com/dxx-rebirth/dxx-rebirth/issues/524>
Gauges aligned to the left side of the screen try to move up in
multiplayer, and move farther in large multiplayer games. However, the
logic for this was inconsistent, and could draw shields and afterburner
state on the same line. Fix this by computing the starting point once,
and passing it down to the functions that need it.
Reported-by: snytek <https://github.com/dxx-rebirth/dxx-rebirth/issues/521>
Testing for buttons||hats||axes is equivalent to testing for
joysticks!=0, since SConstruct forces joysticks=0 when
buttons == 0 && hats == 0 && axes == 0. Remove tests of
buttons||hats||axes when those occur inside a test for joysticks!=0.
This block previously was used to clear TRIGGER_ON, but that change was
removed because TRIGGER_ON was a write-only flag. This block is now
useless, so remove it. This should also fix an obscure crash reported
by AlumiuN.
AlumiuN proposed adding a test that seg->children[side] is still valid,
but since the logic to execute would be useless even when the test
succeeds, it is simpler to remove this code entirely.
Reported-by: AlumiuN <https://github.com/dxx-rebirth/dxx-rebirth/issues/515>
Suggested-by: AlumiuN <https://github.com/dxx-rebirth/dxx-rebirth/pull/518#issue-443277182>
This reverts commit 60edaa7dce.
This commit was brought in through a merge to obtain a different change,
and was supposed to be suppressed in preference to the change from
dfcb0fcdc. Revert it here, since reloading the variable suffices to fix
the problem, and this commit forces a reload on all platforms, rather
than only reloading on platforms that need it.