dxx-rebirth/similar/main
Kp 2f3a76ab15 Revert laser weapon type checking to 0.58.1
Commit 2bcc7bb371 restricted
Laser_create_new to only create lasers for known weapon types.  This
seemed like a good idea, but broke custom levels that use undocumented
laser types.  It also replaced logic that coerced invalid weapon numbers
into a type 1 laser with logic that prevented firing such weapons at
all.  This rendered robots with unknown or broken weapon data unable to
fire.

Commit 0c30fa7cf3 relaxed the logic to
prevent firing only in editor builds, but allow firing unknown or
invalid weapon types in release builds.  Firing unknown weapon types may
work.  Firing invalid weapon types may cause the game to crash when data
is accessed beyond the end of the defined weapon data.  This caused the
crash reported in issue #506.

Revert to the 0.58.1 rule that invalid weapons are coerced to be a
player level 1 laser.  Add a diagnostic when such a weapon is fired,
since the level author should have requested that weapon explicitly if
that was intended.

Reported-by: heftig <https://github.com/dxx-rebirth/dxx-rebirth/issues/506>
Fixes: 2bcc7bb371 ("Only create lasers for known weapon types")
2020-05-02 21:18:43 +00:00
..
ai.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
aipath.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
automap.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
bm.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
bmread.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
cntrlcen.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
collide.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
config.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
console.cpp Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
controls.cpp Move Seismic_tremor_magnitude to d_level_unique_seismic_state 2019-08-06 02:59:41 +00:00
credits.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
digiobj.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
dumpmine.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
effects.cpp Move Control_center_destroyed to d_level_unique_control_center_state 2019-08-15 01:34:22 +00:00
endlevel.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
fireball.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
fuelcen.cpp Require support for C++14 std::exchange 2020-05-02 21:18:42 +00:00
fvi.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
game.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
gamecntl.cpp Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
gamefont.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
gamemine.cpp Use susegment for segment2_read 2019-12-27 02:02:23 +00:00
gamerend.cpp Move Countdown_seconds_left to d_level_unique_control_center_state 2019-08-15 01:34:22 +00:00
gamesave.cpp Use dedicated type for object render_type 2020-05-02 21:18:43 +00:00
gameseg.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
gameseq.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
gauges.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
generate-kconfig-udlr.py Make kconfig.ui-table.cpp compile when freestanding 2019-12-22 05:34:08 +00:00
hostage.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
hud.cpp
iff.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
inferno.cpp Fix bogus unused variable warning from clang in inferno.cpp 2020-01-18 22:43:19 +00:00
kconfig.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
kconfig.ui-table.cpp Make kconfig.ui-table.cpp compile when freestanding 2019-12-22 05:34:08 +00:00
kmatrix.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
laser.cpp Revert laser weapon type checking to 0.58.1 2020-05-02 21:18:43 +00:00
lighting.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
menu.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
mglobal.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
mission.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
morph.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
multi.cpp Use dedicated type for object render_type 2020-05-02 21:18:43 +00:00
multibot.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
net_udp.cpp Qualify uses of std::make_unique 2020-05-02 21:18:42 +00:00
newdemo.cpp Use dedicated type for object render_type 2020-05-02 21:18:43 +00:00
newmenu.cpp Qualify uses of std::make_unique 2020-05-02 21:18:42 +00:00
object.cpp Use dedicated type for object render_type 2020-05-02 21:18:43 +00:00
paging.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
physics.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
piggy.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
player.cpp
playsave.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
polyobj.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
powerup.cpp
render.cpp Modernize typedefs for std::array types 2020-05-02 21:18:42 +00:00
robot.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
scores.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
segment.cpp Use susegment for references introduced by valptridx conversion 2019-12-22 05:34:08 +00:00
slew.cpp Move object::last_pos to LevelUniqueObjectState 2019-12-22 05:34:08 +00:00
songs.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
state.cpp Use dedicated type for object render_type 2020-05-02 21:18:43 +00:00
switch.cpp Require support for C++11 addressof 2020-05-02 21:18:43 +00:00
terrain.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
texmerge.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
text.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
titles.cpp Refer to <memory> directly, not through "compiler-make_unique.h" 2020-05-02 21:18:43 +00:00
vclip.cpp is_proximity_bomb_or_smart_mine*: s/smart/player_smart/g 2019-08-15 01:34:22 +00:00
vers_id.cpp
wall.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00
weapon.cpp Qualify uses of std::array 2020-05-02 21:18:42 +00:00