Commit graph

177 commits

Author SHA1 Message Date
Kp 96b258e958 Cache reference to local player flags 2016-07-03 00:54:15 +00:00
Kp 5b437592b0 Simplify test for vulcan|gauss 2016-06-12 03:45:36 +00:00
zico 416ea963c8 When building D2X, before dropping Vulcan ammo check for presence of Gauss cannon, too. 2016-06-06 15:43:38 +02:00
Kp ae7e808a24 Factor out apply_force_damage calls to apply_damage_to_robot 2016-04-23 17:59:47 +00:00
Kp 5f51e4d683 Fix ordering of collide_player_and_controlcen arguments 2016-04-23 17:59:47 +00:00
Kp 3677e7036e Pass object &to collide_player_and_powerup 2016-04-23 17:59:47 +00:00
Kp b3d40ff5c4 Pass object_base &to drop_missile_1_or_4 2016-04-23 17:59:47 +00:00
Kp 4153c65f57 Pass object_base &to maybe_drop_primary_weapon_egg 2016-04-23 17:59:47 +00:00
Kp 5682d9f7d7 Simplify boss weapon matter test 2016-04-23 17:59:47 +00:00
Kp a6ad28c255 Pass object_base &to do_boss_weapon_collision 2016-04-23 17:59:47 +00:00
Kp e2fce58d6d Pass object_base &to collide_robot_and_controlcen 2016-04-23 17:59:47 +00:00
Kp 2fb0e77028 Simplify collide_robot_and_controlcen
Caller collide_two_objects swaps the inputs to ensure A.type <= B.type.
OBJ_ROBOT = 2, OBJ_CNTRLCEN = 9, so A will always be the robot and B
will always be the controlcen.  Rename the parameters accordingly.  Add
assert statements to check this.
2016-04-23 17:59:47 +00:00
Kp 34d2c5b8e2 Pass object_base &to collide_weapon_and_clutter 2016-04-23 17:59:47 +00:00
Kp a1dac4c254 Pass object_base &to collide_player_and_marker 2016-04-23 17:59:47 +00:00
Kp a152ef009b Pass object_base &to maybe_kill_weapon 2016-04-23 17:59:47 +00:00
Kp 7ea89fda9f Pass object_base &to bump_one_object 2016-04-23 17:59:47 +00:00
Kp 835a9f33d9 Pass object &to collide_robot_and_wall 2016-04-23 17:59:47 +00:00
Kp 3828b8ec96 Simplify bump_two_objects conditional 2016-04-06 03:34:14 +00:00
Kp 0c299248d4 Pass object &to apply_damage_to_player 2016-04-06 03:34:14 +00:00
Kp 27cef20eb3 Move namespace dsx handling to dsx-ns.h 2016-03-19 19:08:10 +00:00
zico 901a554e96 New powerup management code: Addeed functions and packet type to keep track of original and current level inventory as well as player and thief inventories. Calling maybe_drop_net_powerup() for all ammo based weapons except Concussion missiles. Limiting maybe_drop_net_powerup() to only spawn items missing from initial level inventory. Added function to let host respawn items that were lost for whatever reason. Expanded maybe_drop_net_powerup() and child functions to be able to drop item based on a random player. Changed back maybe_drop_secondary_weapon_egg() to its original behavior, dropping 3 of each type max. 2016-02-25 14:11:08 +01:00
zico 4ef50976ed Revised a055aecee5. Removed secondaries cap for Multiplayer but restared for Singleplayer (for gameplay/balance). Limit could be restored for Multiplayer if levels were otherwise properly repopulated (planned) 2016-02-15 13:05:17 +01:00
zico a055aecee5 Apply count cap in maybe_drop_secondary_weapon_egg to bombs only 2016-02-14 12:49:45 +01:00
zico ed25a5c38d Eliminate frame dependent damage with blast weapons - as seen in DXX-Retro 532f271af26d6341563d3763d5bb2dce33de7582 2016-02-14 12:15:30 +01:00
Kp 553b313099 Use vwallptr 2016-02-12 04:02:28 +00:00
Kp e283a22709 Use enum class for check_volatile_wall 2016-01-29 04:05:47 +00:00
Kp bc488a8f57 Improve check_volatile_wall 2016-01-29 04:05:47 +00:00
Kp a3ae630829 Remove default argument for basic_ptridx(index) 2016-01-09 16:38:14 +00:00
Kp cefc79f869 Construct find_point_seg segptridx explicitly 2016-01-09 16:38:13 +00:00
Kp 2b51578ba6 Use enum class for Player_dead_state (formerly Player_is_dead) 2015-12-15 04:09:35 +00:00
Kp 26e948d5f1 Uninline namespace dsx 2015-12-13 18:00:49 +00:00
Kp e549f3451e Use inline namespace dsx for object.h 2015-12-05 22:57:25 +00:00
Kp 9231cfb853 Remove write-only D1 variable Boss_been_hit 2015-12-04 03:36:32 +00:00
Kp 111ac7f7f3 Fix player/marker confusion due to sorting
Fixes: 1d7418497e ("Condense collision table")
2015-12-03 03:26:49 +00:00
Kp 708dc0a7e1 Use vobjptr/vcobjptr for more Objects[] access 2015-12-03 03:26:49 +00:00
Kp b683b4cc68 Scope weapon type 2015-12-03 03:26:49 +00:00
Kp 31d538ebe2 Use helper for robot weapon type 2015-12-03 03:26:48 +00:00
Kp c45f93b503 Short out apply_damage_to_player friendly fire check 2015-11-27 03:56:13 +00:00
Kp 0c75aecc45 Check most uses of object id 2015-11-27 03:56:13 +00:00
Kp 9f26e2211e Warn on invalid object ID access 2015-11-26 02:56:56 +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 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 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 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