Commit graph

7658 commits

Author SHA1 Message Date
Kp 7b4eeb8c0c Suppress debug info for check_header_includes outputs 2015-11-17 03:31:21 +00:00
Kp 66cbd4ae0a Move shields/energy up another line in large games 2015-11-15 22:30:41 +00:00
Kp 0d68cb0aa4 Cache locals in explode_model 2015-11-15 22:30:41 +00:00
Kp c0149be92a Use enum class explosion_vclip_stage for get_explosion_vclip 2015-11-15 22:30:41 +00:00
Kp f09635089e Compact track_track_goal 2015-11-15 22:30:41 +00:00
Kp 59069a7bb6 Compact do_physics_align_object 2015-11-15 22:30:41 +00:00
Kp 02e1f293dd Remove unused old-style floor levelling 2015-11-15 22:30:41 +00:00
Kp ec70edcc65 Use operator= to copy vms_vector 2015-11-15 22:30:40 +00:00
Kp 7d22139334 Fix vulcan ammo drop loop
Fixes: 6037372cdf ("Move player vulcan_ammo to object.ctype.player_info")
2015-11-14 23:42:27 +00:00
Kp 5f5fd23060 Use enum class for HUD type 2015-11-14 18:17:22 +00:00
Kp d36e86f8bc Factor out some Scons None assignments 2015-11-14 18:17:22 +00:00
Kp 0b8a34d56d Remove write-only sc_last_item 2015-11-14 18:17:22 +00:00
Kp 44753209d6 Move homing_object_dist to object.ctype.player_info 2015-11-14 18:17:22 +00:00
Kp 52051c427b Move invulnerable_time to object.ctype.player_info 2015-11-14 18:17:21 +00:00
Kp 9eb8aba4c9 Move cloak_time to object.ctype.player_info 2015-11-14 18:17:21 +00:00
Kp 794e7ddece Use reference_wrapper for cheat bits 2015-11-14 18:17:21 +00:00
Kp f509073b65 Move font allocdata pointer to grs_font 2015-11-14 18:17:21 +00:00
Kp 74290b5150 Add some error checking to font loader 2015-11-14 18:17:21 +00:00
Kp af3241098b Hide save/load game menu items for non-host
Only the host is allowed to save/load, so there is no reason to show the
items to non-hosts.
2015-11-14 18:17:21 +00:00
Kp 8997ec557d Simplify valptridx get_global_array definition 2015-11-14 18:17:21 +00:00
Kp 1fcffee1df Cache draw_polygon_object simple model decision 2015-11-14 18:17:21 +00:00
Kp 4c5d4a36e5 Skip compute_object_light if overridden by bright players 2015-11-14 18:17:20 +00:00
Kp cc80af87e8 Remove unnecessary save/restore of engine glow 2015-11-14 18:17:20 +00:00
Kp a7e44f58ce Use enum class for tmap_drawer_constant
This allows tmap_drawer_type to use regular functions instead of
template functions and causes the debugger to show the symbolic name of
the type.
2015-11-14 18:17:20 +00:00
Kp 0ebe9e48b8 Remove buddy's useless Player_is_dead test
The headlight should be off when the player is dead.
2015-11-14 18:17:20 +00:00
Kp 7df905c1db Fix weapon selection after respawn
Commit 7da64d3 added the ability to select a weapon when firing stops.
However, it did not take into account that
select_primary_weapon/select_secondary_weapon do not check whether the
selected weapon is available.  The caller must perform that check.  The
draft version proposed by Mako88 in the original feature request mostly
avoided the problem by clearing the delayed auto-select when it was
first applied.  That version would only manifest the problem if the
player had a delayed auto-select and lost the weapon before resolving
it, whether due to death, a thief bot, or, in the case of mines,
direct-dropping the last mine by the "Drop Bomb" key.

The version that went in switched to using delayed==active to indicate
that no change was required.  Under that design, the incorrect
auto-select appears if the player loses the active weapon even if no
delayed selection was pending.

Add a check that the player has the weapon before switching to it and
reset delayed=current if the delayed weapon is not available.  This
fixes all known cases under which a spurious delayed selection could
activate a missing weapon and prevents repeated checks for weapon
availability.

Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/158>
Fixes: 7da64d3782 ("Add new autoselect-while-firing mode: "when firing stops"")
2015-11-12 02:57:45 +00:00
Kp 9a132977b9 Fix drop_player_eggs smart mine logic
The count of mines was not decremented, so a player who entered the loop
could continue to drop until (d_rand() < rthresh) became false.  Halving
rthresh on each pass guaranteed that it would stop, but with the right
string of random numbers, the player could drop more mines than he had.
Remove the ==1 qualifier, so that mines can spawn whenever one will be
lost to rounding.
2015-11-12 02:57:45 +00:00
Kp 93888b4e37 Move collide_two_objects swap back to top
Fixes: 1d7418497e ("Condense collision table")
2015-11-09 02:33:49 +00:00
Kp f5fc9cc324 Prevent selecting slider above maximum value 2015-11-08 18:55:51 +00:00
Kp 36716a9770 Add shift+page(up|down) to move autoselect entry to end 2015-11-08 18:55:51 +00:00
Kp 44c4eb9dc3 Combine exception paths 2015-11-08 18:55:51 +00:00
Kp 1d7418497e Condense collision table 2015-11-08 18:55:50 +00:00
Kp 1a2e4205f6 Combine related call_object_create_egg calls 2015-11-07 21:56:00 +00:00
Kp 9c5b5b3e36 Start ammunition-driven autoselect at 0 2015-11-07 21:56:00 +00:00
Kp 0c86fd507d Fix mingw32 build
Fixes: 38df160341 ("Create platform_settings, env on first use")
2015-11-07 21:56:00 +00:00
Kp 899c335158 Factor out cloak duration lookup for draw_cloaked_object 2015-11-07 21:56:00 +00:00
Kp 6b353cb9ac Move player powerup_flags to object.ctype.player_info 2015-11-07 21:55:59 +00:00
Kp 8a81e25ab0 Move player laser_level to object.ctype.player_info 2015-11-07 21:55:59 +00:00
Kp b788d0b563 Move player primary_weapon_flags to object.ctype.player_info 2015-11-07 21:55:59 +00:00
Kp 8d6949efa6 Move player killer_objnum to object.ctype.player_info 2015-11-07 21:55:59 +00:00
Kp 6037372cdf Move player vulcan_ammo to object.ctype.player_info 2015-11-07 21:55:59 +00:00
Kp e227ef1b32 Move player secondary_ammo to object.ctype.player_info 2015-11-07 21:55:58 +00:00
Kp 6fd6436f14 Move player energy to object.ctype.player_info 2015-11-07 21:55:58 +00:00
Kp 2e28a491f2 Move player shields to struct object 2015-11-07 21:55:58 +00:00
Kp 6eb1676ada Bulk clear secondary_ammo 2015-11-07 21:55:58 +00:00
Kp a0a5aaef8d Fix bogus "You have no" selecting missiles
Fixes: e130ea7b36 ("Remove unnecessary secondary_weapon_flags")
2015-11-06 03:51:10 +00:00
Kp e58cac8741 Document some usage of C++11/C++14 features 2015-11-06 03:51:10 +00:00
Kp 4d2673594e Fix placement of invulnerability timer 2015-11-06 03:51:10 +00:00
Kp c0ca1248fd Simplify hostage lost message 2015-11-06 03:51:10 +00:00
Kp ccee595321 Remove Interpolation_method from OGL build 2015-11-06 03:51:10 +00:00