dxx-rebirth/common/main
Kp 8d3f47d646 Fix hoard orb handling on player death
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>
2020-08-01 18:29:01 +00:00
..
ai.h Modernize typedefs for std::array types 2020-05-02 21:18:42 +00:00
aistruct.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
automap.h Use enum class for marker index types 2020-07-22 03:11:18 +00:00
bm.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
cast_range_result.h Remove static inline declarations from fwd-partial_range.h 2020-06-10 02:25:32 +00:00
cli.cpp Switch most in-tree http:// links to https:// 2018-09-02 00:57:29 +00:00
cli.h Switch most in-tree http:// links to https:// 2018-09-02 00:57:29 +00:00
cmd.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
cmd.h Switch most in-tree http:// links to https:// 2018-09-02 00:57:29 +00:00
cntrlcen.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
collide.h Simplify valptridx types where possible 2019-12-22 05:34:08 +00:00
config.h Use enum class for LevelMusicPlayOrder 2020-05-31 23:04:25 +00:00
controls.h Pass object& to read_flying_controls 2018-06-24 05:06:15 +00:00
credits.h Split credits_show special case into dedicated functions 2016-08-19 03:41:42 +00:00
cvar.cpp Switch most in-tree http:// links to https:// 2018-09-02 00:57:29 +00:00
cvar.h Switch most in-tree http:// links to https:// 2018-09-02 00:57:29 +00:00
d_array.h Use enum class for marker index types 2020-07-22 03:11:18 +00:00
d_enumerate.h Replace enumerate helper function with class template argument deduction 2020-07-16 02:31:04 +00:00
d_range.h Rename xrange_extent to xrange 2020-07-16 02:31:04 +00:00
d_srcloc.h Switch most in-tree http:// links to https:// 2018-09-02 00:57:29 +00:00
d_zip.h Use enum class for marker index types 2020-07-22 03:11:18 +00:00
digi.h Use enum class for LevelMusicPlayOrder 2020-05-31 23:04:25 +00:00
effects.h Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
endlevel.h Move exit_segnum to d_player_unique_endlevel_state 2019-08-15 01:34:22 +00:00
ephemeral_range.h Use std::disjunction to simplify any_ephemeral_range 2020-07-16 02:31:04 +00:00
escort.h Add experimental support for guidebot in multiplayer 2019-06-27 03:26:20 +00:00
fireball.h Remove static inline declarations from fwd-partial_range.h 2020-06-10 02:25:32 +00:00
fuelcen.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
fvi.h Use susegment for references introduced by valptridx conversion 2019-12-22 05:34:08 +00:00
fwd-object.h Use enum class for marker index types 2020-07-22 03:11:18 +00:00
fwd-player.h Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
fwd-segment.h Change enum side_type to enum class side_type 2020-07-16 02:31:04 +00:00
fwd-vclip.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
fwd-wall.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
fwd-weapon.h Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
game.h Use enum class for marker index types 2020-07-22 03:11:18 +00:00
gamefont.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
gamemine.h Move Secret_return_orient to d_level_shared_segment_state 2019-08-06 02:59:41 +00:00
gamepal.h Fix check_header_includes build 2016-01-09 16:38:12 +00:00
gameplayopt.h Add experimental support for autosaves 2020-04-19 20:47:07 +00:00
gamesave.h Eliminate unnecessary Gamesave_current_filename 2019-08-06 02:59:40 +00:00
gameseg.h Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
gameseq.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
gauges.h Modernize typedefs for std::array types 2020-05-02 21:18:42 +00:00
hostage.h Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
hudmsg.h Switch most in-tree http:// links to https:// 2018-09-02 00:57:29 +00:00
inferno.h Move Death_sequence_aborted to d_game_view_unique_state 2019-08-15 01:34:22 +00:00
kconfig.h Remove outdated joystick preprocessor guards 2020-07-16 02:31:04 +00:00
kmatrix.h Use #ifdef dsx to guard dsx namespace 2016-01-09 16:38:15 +00:00
laser.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
lighting.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
menu.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
mission.h Fix saving/loading games for missions in subdirectories 2020-01-18 21:57:39 +00:00
morph.h Fix check_header_includes=1 build 2020-05-17 23:35:25 +00:00
multi.h Fix hoard orb handling on player death 2020-08-01 18:29:01 +00:00
multibot.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
multiinternal.h Fix hoard orb handling on player death 2020-08-01 18:29:01 +00:00
net_udp.h Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
newdemo.h Fix check_header_includes=1 build 2020-05-17 23:35:25 +00:00
newmenu.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
nvparse.h Replace "compiler-type_traits.h" with <type_traits> 2017-06-25 20:46:03 +00:00
object.h Use enum class for marker index types 2020-07-22 03:11:18 +00:00
objnum.h Explicitly zero-initialize object structure members 2020-05-02 21:18:42 +00:00
paging.h Pass Vclip as context 2018-10-21 00:24:07 +00:00
physfsrwops.h Delegate PCX loading to SDL_image 2020-05-17 23:35:26 +00:00
physics.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
physics_info.h Fix check_header_includes=1 build 2020-05-17 23:35:25 +00:00
piggy.h Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
player-callsign.h Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
player-flags.h Switch most in-tree http:// links to https:// 2018-09-02 00:57:29 +00:00
player.h Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
playsave.h Convert kconfig array lookups to require correct enumerated type 2020-07-05 23:34:33 +00:00
polyobj.h Move polymodel alignment code to interp.cpp 2020-07-05 23:34:33 +00:00
powerup.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
render.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
render_state.h Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
robot.h Remove static inline declarations from fwd-partial_range.h 2020-06-10 02:25:32 +00:00
scores.h Propagate scores_maybe_add_player argument 2016-12-10 17:51:08 +00:00
screens.h Use #ifdef dsx to guard dsx namespace 2016-01-09 16:38:15 +00:00
segiter.h Remove use of deprecated std::iterator 2020-05-02 21:18:43 +00:00
segment.h Change enum side_type to enum class side_type 2020-07-16 02:31:04 +00:00
segpoint.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
selfiter.h Remove use of deprecated std::iterator 2020-05-02 21:18:43 +00:00
slew.h Always qualify valptridx type/factory 2017-06-10 03:31:02 +00:00
songs.h Refactor song loading 2019-08-25 16:43:17 +00:00
sounds.h Use enum sound_effect for hardcoded sound index numbers 2020-06-10 02:25:32 +00:00
state.h Fix check_header_includes=1 build 2020-05-17 23:35:25 +00:00
switch.h Remove TRIGGER_FLAG::ON; it is write-only 2020-07-07 04:09:44 +00:00
terrain.h Move Viewer_eye to local scope 2018-12-30 00:43:57 +00:00
texmerge.h Propagate constant texmerge_init argument 2016-11-19 17:24:52 +00:00
text.h Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
textures.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
titles.h Move intro_played to dsx 2017-03-18 18:07:35 +00:00
valptridx.tcc Require support for C++11 addressof 2020-05-02 21:18:43 +00:00
vclip.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
vers_id.h Switch most in-tree http:// links to https:// 2018-09-02 00:57:29 +00:00
wall.h Qualify uses of std::array 2020-05-02 21:18:42 +00:00
weapon.h Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
weapon_id.h Whitelist Vertigo smelter's phoenix cannon 2019-10-21 03:45:29 +00:00