dxx-rebirth/common/main
Kp 2440a271da Improve vulcan/gauss pickup rules
- Change D1X to use D2X rules regarding Vulcan cannon pickup.  The D1X
  rules were confusing at best, and seem outright wrong in some ways.
  - When a Vulcan cannon was picked up, it was treated as containing not
    less than VULCAN_WEAPON_AMMO_AMOUNT rounds, regardless of what it
    actually contained.  D2X respected the actual contained count, even
    when running in D1X emulation mode.
  - In D1X single player, if the Vulcan cannon was not picked up, then
    it could be treated as Vulcan ammo.  If at least 1 unit of
    ammunition was added to the player, the entire powerup would be
    consumed, regardless of how much ammunition remained.
  - In D2X single player, if the Vulcan cannon was not picked up, then
    ammunition would be taken from it, but the powerup would only be
    consumed if all its ammunition was taken.
  - In D1X multiplayer, a player who already had a Vulcan cannon could
    not get anything from touching a new cannon, and the cannon would
    not be changed.
  - In D2X multiplayer, a player who already had a Vulcan cannon could
    take ammunition from the cannon, but the cannon could not be drained
    below VULCAN_AMMO_AMOUNT.  If the cannon had VULCAN_AMMO_AMOUNT or
    less, then the player could not take ammunition.  If the cannon had
    more, the player could drain it to that level.
  - Replace all that with a simplified version of the D2X rules:
    - If the player does not have the cannon, the cannon is picked up
      and removed from the mine.  The player takes as much of its
      ammunition as possible.  If the cannon was well stocked, and the
      player was nearly full, some ammunition will be lost.  This is
      unfortunate, but the game has always had this rule, and changing
      it would require dropping one or more Vulcan Ammo packs to
      represent the untaken ammunition.
    - If the player already had that cannon, then the player takes as
      much ammunition as the cannon has, while not exceeding the
      ammunition cap.  Other players, if any, are updated about how much
      ammunition remains in the cannon.  The cannon remains in the mine.
- Backport to D1X the network message for updating the contained
  ammunition in a vulcan cannon.  zico added the basic feature in
  7684ce92, but only applied it to D2X.  With the change to let D1X
  multiplayer take ammunition from the cannon, D1X now needs the same
  feature.
- Remove the special case to delete an empty cannon.  Instead, let the
  cannon remain in the mine without ammunition.  This allows a player in
  single player mode to leave behind a backup cannon, which could be
  useful if the player is killed and wishes to rearm before returning to
  the death site.  Similarly, under the new rule that players in
  multiplayer can drain the cannon down to 0 ammunition, this removal
  allows the cannon to remain behind for someone else to take, rather
  than allowing it to be deleted by a player who already had an instance
  of it.
2022-02-05 13:30:56 +00:00
..
ai.h Use enumerated_array for shared_segment::sides 2022-01-15 20:39:10 +00:00
aistruct.h Tighten index handling for Ai_transition_table 2022-01-08 17:48:09 +00:00
automap.h Use enum class for Game_mode, Newdemo_game_mode 2021-09-12 16:20:52 +00:00
bm.h Use enum class for tmapinfo_flags 2021-11-01 03:37:20 +00:00
cast_range_result.h
cli.cpp Return string width/height from gr_get_string_size 2021-09-12 16:20:52 +00:00
cli.h
cmd.cpp Improve error reporting for PHYSFSX_openReadBuffered 2021-07-25 23:00:56 +00:00
cmd.h
cntrlcen.h Validate control center trigger sides on load 2022-01-09 15:25:42 +00:00
collide.h Use enumerated_array for shared_segment::sides 2022-01-15 20:39:10 +00:00
config.h Move ResolutionX, ResolutionY to CCfg 2021-01-25 00:45:07 +00:00
controls.h
credits.h
cvar.cpp optimize include files (include what you use) 2021-02-06 21:38:50 +01:00
cvar.h
d_array.h Make enumerate() index by array's index_type 2021-09-04 12:17:14 +00:00
d_bitset.h Replace __attribute_warn_unused_result with C++17 [[nodiscard]] 2021-06-28 03:37:51 +00:00
d_crange.h Make MAX_SIDES_PER_SEGMENT an iterable range 2022-01-09 15:25:42 +00:00
d_enumerate.h Make enumerate() index by array's index_type 2021-09-04 12:17:14 +00:00
d_levelstate.h Inline out object_number_array 2022-01-07 04:26:22 +00:00
d_range.h Factor out get_xrange_direction 2022-01-09 15:25:42 +00:00
d_srcloc.h
d_zip.h Remove unnecessary definitions of get_static_size 2022-01-07 04:26:22 +00:00
digi.h Use enum class for sound angle parameter 2021-06-28 03:37:51 +00:00
effects.h Use enumerated_array for unique_segment::sides 2022-01-15 20:39:10 +00:00
endlevel.h
ephemeral_range.h
escort.h
fireball.h Use enum class for segment_relative_vertnum 2022-01-09 15:25:42 +00:00
fuelcen.h Use enum class for station_number 2021-11-01 03:37:20 +00:00
fvi.h Use enumerated_array for shared_segment::sides 2022-01-15 20:39:10 +00:00
fwd-d_array.h
fwd-object.h Move object_rw to namespace dsx 2022-01-09 15:25:42 +00:00
fwd-player.h
fwd-segment.h Use enumerated_array for unique_side::uvls 2022-01-15 20:39:10 +00:00
fwd-vclip.h
fwd-wall.h Use enumerated_array for unique_segment::sides 2022-01-15 20:39:10 +00:00
fwd-weapon.h Use primary_weapon_index_t for pick_up_primary 2021-01-25 00:45:07 +00:00
game.h Use enum sidenum_t in more places 2022-01-09 15:25:42 +00:00
gamefont.h Make font scaling constructors explicit 2021-09-19 10:53:48 +00:00
gamemine.h Remove support for reading Miner's .LVL files 2020-12-20 20:39:07 +00:00
gamepal.h
gameplayopt.h
gamesave.h
gameseg.h Use enumerated_array for unique_side::uvls 2022-01-15 20:39:10 +00:00
gameseq.h Move Next_level_num to local scope 2021-11-01 03:37:19 +00:00
gauges.h Pass canvas to do_cockpit_window_view 2021-09-12 16:20:52 +00:00
hostage.h
hudmsg.h
inferno.h Explicitly default d_fname copy constructor 2022-01-07 04:26:22 +00:00
kconfig.h Fix Windows build of kconfig.h 2021-04-04 22:01:25 +00:00
kmatrix.h
laser.h
lighting.h Use enum class for vertnum_t 2020-12-26 21:17:29 +00:00
menu.h
mission.h Expand macro Current_mission_longname 2021-11-01 03:37:19 +00:00
morph.h
multi.h Improve vulcan/gauss pickup rules 2022-02-05 13:30:56 +00:00
multibot.h Use enum class for station_number 2021-11-01 03:37:20 +00:00
multiinternal.h Improve vulcan/gauss pickup rules 2022-02-05 13:30:56 +00:00
net_udp.h Use enum class for network_game_type 2021-11-01 03:37:19 +00:00
newdemo.h Use enum class for wall_state 2021-11-01 03:37:19 +00:00
newmenu.h Save parent canvas in listbox_layout 2021-09-12 16:20:52 +00:00
nvparse.h
object.h Move object_rw to namespace dsx 2022-01-09 15:25:42 +00:00
objnum.h
paging.h
physfsrwops.h Return error code from PHYSFSRWOPS_openRead* 2021-07-25 23:00:56 +00:00
physics.h
physics_info.h
piggy.h Improve error reporting for read_sndfile 2021-07-25 23:00:56 +00:00
player-callsign.h Replace __attribute_warn_unused_result with C++17 [[nodiscard]] 2021-06-28 03:37:51 +00:00
player-flags.h
player.h Only prepare pause time if it will be shown 2021-09-12 16:20:52 +00:00
playsave.h optimize include files (include what you use) 2021-02-06 21:38:50 +01:00
polyobj.h
powerup.h Reduce use of global structures in cheat functions 2021-04-04 22:01:25 +00:00
render.h Use enum sidenum_t in more places 2022-01-09 15:25:42 +00:00
render_state.h
robot.h Use enumerated_array for difficulty-level-specific arrays 2021-09-19 10:53:48 +00:00
scores.h Pass canvas to scores_view_menu 2021-09-19 10:53:48 +00:00
screens.h Disallow direct construction of grs_canvas 2021-09-04 12:17:14 +00:00
segiter.h Replace __attribute_warn_unused_result with C++17 [[nodiscard]] 2021-06-28 03:37:51 +00:00
segment.h Use enumerated_array for unique_side::uvls 2022-01-15 20:39:10 +00:00
segpoint.h Use enum class for vertnum_t 2020-12-26 21:17:29 +00:00
selfiter.h
slew.h
songs.h
sounds.h optimize include files (include what you use) 2021-02-06 21:38:50 +01:00
state.h Pass canvas to savegame_chooser_newmenu 2021-09-19 10:53:48 +00:00
switch.h Use enumerated_array for shared_segment::sides 2022-01-15 20:39:10 +00:00
terrain.h
texmerge.h Move grs_main_bitmap earlier in the header 2021-09-04 12:17:14 +00:00
text.h Use named Difficulty_level enum members in MENU_DIFFICULTY_TEXT 2020-12-27 22:03:09 +00:00
textures.h
titles.h
valptridx.tcc Use enum class for actdoornum_t 2020-12-20 20:39:07 +00:00
vclip.h
vers_id.h
wall.h Use enum sidenum_t in more places 2022-01-09 15:25:42 +00:00
weapon.h Use enum class for weapon_info::persistent 2021-09-19 10:53:48 +00:00
weapon_id.h