Commit graph

1866 commits

Author SHA1 Message Date
Kp 29aa820dc0 Only respawn when the player presses fire
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
2015-06-20 16:16:43 +00:00
Kp 2a62fa7d78 Make Spawn invulnerability a slider in 0s-4s 2015-06-13 22:42:22 +00:00
Kp a64a08fd6c Raise kill goal limit to 100 2015-06-13 22:42:22 +00:00
Kp e3308be8b9 Cache font LINE_SPACING 2015-06-13 22:42:22 +00:00
Kp fc730cb6b0 Cache multi_do_light side array 2015-06-13 22:42:22 +00:00
Kp c72a3a9b11 Make Stuck_objects static 2015-06-13 22:42:21 +00:00
Kp 3905f1a668 Enable -Wcast-qual 2015-06-13 22:42:21 +00:00
Kp c8ce2c32de Simplify extract_shortpos_little 2015-06-13 22:42:21 +00:00
Kp 1dc0e24f30 Propagate swap_bytes argument for create_shortpos
In every case but one, create_shortpos was called with a constant flag
equal to words_bigendian.  The demo system called it with a constant 0.
Split create_shortpos into create_shortpos_little and
create_shortpos_native.  Use create_shortpos_native for the demo system,
and create_shortpos_little everywhere else.
2015-06-13 22:42:21 +00:00
Kp ce72014e2e Always parse WORDS_BIGENDIAN and !WORDS_BIGENDIAN 2015-06-13 22:42:21 +00:00
Kp 2d70cd65ea Cache font space results 2015-06-13 22:42:20 +00:00
Kp 78f6dc29a6 Cache font scale Y float 2015-06-13 22:42:20 +00:00
Kp 5573ed6bea Cache font scale X float 2015-06-13 22:42:20 +00:00
Kp 404e7e1d63 Shorten kmatrix_redraw 2015-06-13 22:42:20 +00:00
Kp f788de2e9f Avoid repeated strlen while truncating gauge name 2015-06-13 22:42:20 +00:00
Kp b2887abd51 Cache globals in hud_show_cloak_invuln 2015-06-13 22:42:20 +00:00
Kp 379a2a32b7 Use operator?: for similar gr_printf in gauges 2015-06-13 22:42:19 +00:00
Kp 7b1e774cb8 Hack around buggy clang constant warning
clang whines that static_assert(A && B) uses && with a constant operand,
but this is necessary and correct, because static_assert only takes
compile-time constant expressions.  However, !!A && !!B does not warn.
Switch to !!A && !!B to silence the clang whining.

similar/main/collide.cpp:2566:63: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
 static_assert(collision_result_t<OBJ_WALL, OBJ_ROBOT>::value && collision_result_t<OBJ_ROBOT, OBJ_WALL>::value, "OBJ_WALL" " " "OBJ_ROBOT");
2015-06-13 22:42:19 +00:00
Kp 994350f752 Use valptr for state highest_valid 2015-06-13 22:42:19 +00:00
Kp f98e884fdf Use valptr for paging highest_valid 2015-06-13 22:42:18 +00:00
Kp a4d3c55fe4 Use valptr for object highest_valid 2015-06-13 22:42:18 +00:00
Kp ac5d5b879a Use valptr for newdemo highest_valid 2015-06-13 22:42:18 +00:00
Kp 4a8f836a3d Use valptr for net_udp highest_valid 2015-06-13 22:42:18 +00:00
Kp 71e7432290 Use valptr for multibot highest_valid 2015-06-13 22:42:18 +00:00
Kp 546f361c5f Use valptr for multi highest_valid 2015-06-13 22:42:18 +00:00
Kp 3d323dd194 Use valptr for lighting highest_valid 2015-06-13 22:42:17 +00:00
Kp bbb0b225b4 Use valptr for gameseq highest_valid 2015-06-13 22:42:17 +00:00
Kp a8e1e504ef Use valptr for gameseg highest_valid 2015-06-13 22:42:17 +00:00
Kp 3c748c2418 Use valptr for gamesave highest_valid 2015-06-13 22:42:17 +00:00
Kp be34e5a959 Use valptr for gamemine highest_valid 2015-06-13 22:42:17 +00:00
Kp 1bbfe3e830 Use valptr for gamecntl highest_valid 2015-06-13 22:42:17 +00:00
Kp 8042d6c120 Use valptr for game highest_valid 2015-06-13 22:42:17 +00:00
Kp 9d5bc102ab Use valptr for fuelcen highest_valid 2015-06-13 22:42:17 +00:00
Kp b9d6c577be Use valptr for endlevel highest_valid 2015-06-13 22:42:16 +00:00
Kp c5bd78f4bc Use valptr for dumpmine highest_valid 2015-06-13 22:42:16 +00:00
Kp a53a348f09 Use valptr for cntrlcen highest_valid 2015-06-13 22:42:16 +00:00
Kp 4c5ce566ef Use valptr for automap highest_valid 2015-06-13 22:42:16 +00:00
Kp cda5cb160c Use valptr for aipath highest_valid 2015-06-13 22:42:16 +00:00
Kp 1f9650d402 Use valptr for ai highest_valid 2015-06-13 22:42:16 +00:00
Kp 9125ae32cd Make objnum unsigned 2015-06-13 22:42:15 +00:00
Kp 00c1429ebf Use enum for Escort_special_goal 2015-06-13 22:42:15 +00:00
Kp 148c0f44c8 Convert segnum_t to uint16_t 2015-06-13 22:42:15 +00:00
Kp 5124c510f8 Fix serial endian_access -fno-inline build 2015-06-11 03:06:58 +00:00
Kp 75b72dc8e9 Fix hoard_resources_type -fno-inline build
Fixes: e116e894b0 ("Fix invalid free when hoard data is missing")
2015-06-11 03:06:58 +00:00
Kp 906f93ddf1 Fix has_weapon_result -fno-inline build
Fixes: 9d213b5282 ("Wrap player_has_weapon return type")
2015-06-11 03:06:58 +00:00
John Ackerman fe71a94d53 Implement Nonlinear Joystick Settings
[Kp: fix whitespace; squash fixes into main]
Requested-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/pull/84>
2015-06-11 01:41:26 +00:00
Kp f6d6f221ad Fix array underread for D1 bosses in D2 2015-06-07 16:21:37 +00:00
Kp 7e263323bc Simplify boss invulnerability lookup 2015-06-07 16:21:37 +00:00
Kp 7c436f1fbb Merge pull #39 into unification/master
Requested-by: btb <https://github.com/dxx-rebirth/dxx-rebirth/pull/39>
Acked-by: Matt1360 <https://github.com/dxx-rebirth/dxx-rebirth/pull/39#issuecomment-88712761>
Acked-by: zico <https://github.com/dxx-rebirth/dxx-rebirth/pull/39#issuecomment-88907523>
2015-06-07 16:21:37 +00:00
Kp ff452dbded Move CLI code to common
None of it depends on D1 vs D2.
2015-06-07 16:20:46 +00:00