Commit graph

3400 commits

Author SHA1 Message Date
Kp ba914fea81 Pass up various return values 2017-02-26 00:00:02 +00:00
Kp 673baa15e9 Clear FakingInvul when enabling real invulnerability 2017-02-26 00:00:01 +00:00
Kp 8a89313ec4 Move compute_segment_center body to dcx 2017-02-22 03:05:44 +00:00
Kp 892d450022 Move compute_center_point_on_side body to dcx 2017-02-22 03:05:43 +00:00
Kp df54e345fe Remove write-only fvi_hit_seg 2017-02-22 03:05:43 +00:00
Kp 08e4a6e620 Use stdint constants for some INT*_MAX
clang becomes confused trying to determine which vm_distance_squared
constructor to use for a literal input of 0x7fffffffffffffff, even
though the size of the input requires it to be `long` and only one
constructor can take a `long`.  Switch from an explicit
0x7fffffffffffffff to the symbolic constant INT64_MAX, which has the
same value, but a platform-appropriate suffix to force the compiler to
pick the right type.

For general clarity, switch some other instances of integer maximum
literals to symbolic constants of the same value.

This commit has no effect on the generated code (except for changes to
line numbers).

Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/pull/324>
Fixes: 17208cca79 ("Disallow int for vm_distance_squared")
2017-02-22 03:05:43 +00:00
Chris Taylor 05b8cc4897 Exit GameProcessFrame() when game over
After getting game over, playing a demo would result in the 'Game Over' banner being shown. When loading a saved game, it would fail an assert when trying to obj_delete a NULL Dead_player_camera in dead_player_end().
2017-02-20 08:04:55 +08:00
Chris Taylor b17a9f8550 start_time() time when game over
After getting game over, the game would be stopped when playing a demo or loading a saved game. This is now fixed.
2017-02-20 08:04:55 +08:00
Kp dc090958d1 Reduce D1 spreadfire cost
Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/322>
Analyzed-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/322#issuecomment-280896375>
Fixes: 10ff2b9ea2 ("Change Primary_weapon_to_weapon_info key to weapon_id_type")
2017-02-19 19:33:45 +00:00
Kp 6cd6189681 Never pass nullptr to ai_door_is_openable
When objp is nullptr, ai_door_is_openable assumes Buddy_objnum is a
valid object number, but this assumption is not guaranteed to be true.
When it is false, the game crashes.  This crash can be triggered by a
brain robot trying to make nearby robots snipe.

Fix the crash by passing the robot of interest.

Reported-by: Yarn <http://www.dxx-rebirth.com/frm/index.php/topic,2165.0.html>
2017-02-19 19:33:45 +00:00
Kp 859b399d20 Use mask for Secondary_last_was_super 2017-02-19 19:33:45 +00:00
Kp aeb452f715 Fold do_weapon_n_item_stuff toggle sound 2017-02-19 19:33:44 +00:00
Kp 7c658fd8cd Use mask for Primary_last_was_super 2017-02-19 19:33:44 +00:00
Kp 16dde117fd Reduce scope of state_restore_all_sub j 2017-02-19 19:33:44 +00:00
Kp a6cd87613c Pass polymodel &to free_model 2017-02-19 19:33:44 +00:00
Kp 1a7659897a Pass canvas to draw_model_picture 2017-02-19 19:33:44 +00:00
Kp b02e2e9a3a Use range_for in draw_polygon_model 2017-02-19 19:33:44 +00:00
Kp 39071d124d Pass canvas to draw_polygon_model 2017-02-19 19:33:43 +00:00
Kp 92d1637b5a Pass canvas to show_time 2017-02-19 19:33:43 +00:00
Kp 91a3e0f27a Pass canvas to sb_show_lives 2017-02-19 19:33:43 +00:00
Kp 8a6be6e17f Pass canvas to hud_show_lives 2017-02-19 19:33:43 +00:00
Kp 0aaf425dab Pass canvas to hud_show_shield 2017-02-19 19:33:43 +00:00
Kp 34895edc52 Pass canvas to hud_show_cloak_invuln 2017-02-19 19:33:43 +00:00
Kp 13e9a38c7b Pass canvas to hud_show_weapons 2017-02-19 19:33:42 +00:00
Kp 16718be160 Pass canvas to hud_show_secondary_weapons_mode 2017-02-19 19:33:42 +00:00
Kp ecf53f967d Pass canvas to hud_show_primary_weapons_mode 2017-02-19 19:33:42 +00:00
Kp bbfe38cecc Pass canvas to hud_printf_vulcan_ammo 2017-02-19 19:33:42 +00:00
Kp 4206c68f44 Pass canvas to hud_set_vulcan_ammo_fontcolor 2017-02-19 19:33:42 +00:00
Kp 3eb84e9dd2 Pass canvas to hud_set_secondary_weapon_fontcolor 2017-02-19 19:33:42 +00:00
Kp 499ac14241 Pass canvas to hud_set_primary_weapon_fontcolor 2017-02-19 19:33:41 +00:00
Kp d5a197e7f3 Pass canvas to draw_primary_ammo_info 2017-02-19 19:33:41 +00:00
Kp ddb5f1c6ce Pass canvas to draw_secondary_ammo_info 2017-02-19 19:33:41 +00:00
Kp e4848e09ef Pass canvas to draw_ammo_info 2017-02-19 19:33:41 +00:00
Kp 51488e446f Pass canvas to show_bomb_count 2017-02-19 19:33:41 +00:00
Kp b45de8592a Pass canvas to hud_show_homing_warning 2017-02-19 19:33:41 +00:00
Kp 0e1a670694 Pass canvas to sb_show_score_added 2017-02-19 19:33:41 +00:00
Kp 1ebfb6c6e5 Cache canvas in draw_keys_state 2017-02-19 19:33:40 +00:00
Kp 4b1c0f4198 Combine draw_keys_state subtypes 2017-02-19 19:33:40 +00:00
Kp 205b9ddae4 Pass multires_gauge_graphic to HUD_SCALE_X_AR, HUD_SCALE_Y_AR 2017-02-19 19:33:40 +00:00
Kp e3699252f7 Pass multires_gauge_graphic to HUD_SCALE_X, HUD_SCALE_Y 2017-02-19 19:33:40 +00:00
Kp c64152fe79 Pass multires_gauge_graphic to BASE_WIDTH, BASE_HEIGHT 2017-02-19 19:33:40 +00:00
Kp 463fe1f643 Pass canvas to sb_show_score 2017-02-19 19:33:40 +00:00
Kp 7c25caafa6 Pass canvas to hud_show_score_added 2017-02-19 19:33:39 +00:00
Kp 19318b7e74 Pass canvas to hud_show_timer_count 2017-02-19 19:33:39 +00:00
Kp 960ba8a9d2 Pass canvas to hud_show_score 2017-02-19 19:33:39 +00:00
Kp 530856f909 Pass canvas to hud_gauge_bitblt 2017-02-19 19:33:39 +00:00
Kp d0bc9c1703 Pass canvas to hud_bitblt 2017-02-19 19:33:39 +00:00
Kp d98a18583b Pass canvas to hud_bitblt_free 2017-02-19 19:33:39 +00:00
Kp 1e13617c3e Pass canvas to hud_show_afterburner 2017-02-19 19:33:39 +00:00
Kp 4947779952 Pass canvas to hud_show_energy 2017-02-19 19:33:38 +00:00