Commit graph

96 commits

Author SHA1 Message Date
zico e0785251c4 Reset homing_object_dist along with d_homer_tick_step instead of every frame to make sure lock indicator is visible in frames where homers wait for a new chance to turn; Also moved call of calc_d_tick() to calc_frame_time() - shouldn't be nested in calc_d_homer_tick() 2015-09-10 14:11:30 +02:00
zico cbaac96324 Fixed (hacked) homing missiles fired by bots that would not track players if player with lowest objnum is dead 2015-09-10 13:19:34 +02:00
Kp 2eeca09ae1 Improve create_smart_children
Use accurate squared distance instead of quick non-squared distance.
Simplify target choice loop.
2015-08-17 02:44:56 +00:00
Kp e5683593ef Expand ZERO_VECTOR inline 2015-08-13 03:15:53 +00:00
Kp bda7fef3a0 Use get_local_player to compute reference to local player 2015-07-25 23:10:46 +00:00
Kp f38e80c053 Use get_local_plrobj to compute reference to object of local player 2015-07-25 23:10:45 +00:00
Kp d4c2152009 Shorten calc_d_tick 2015-07-18 21:01:57 +00:00
Kp 2b604d6193 Use valptr for laser.cpp 2015-07-12 01:04:20 +00:00
Kp a523171748 Shorten calc_d_homer_tick
Combine redundant write to d_homer_tick_step
Combine redundant write to static timer
Only test for exceeding 3*cap if timer >= 1*cap
2015-05-30 16:53:49 +00:00
zico b04282e791 Using one global yet independent timeer for homing missiles similar to d_tick instead of having one in each missile object. Also decreased HOMING_TURNING_TIME to 25 FPS base 2015-05-30 18:29:41 +02:00
zico 7414b8165d Fixed little regression from previous commit: Do not increade homing tick every frame but according to turn time - duh 2015-05-28 16:07:24 +02:00
zico 7ba3d1317b Isolated all of the homing code into time-depending condition determined by track_turn_time and added track_turn_tick to make target re-discovery dependent on the individual missile tracking instead of global d_tick_count 2015-05-28 15:22:40 +02:00
Kp ed86b53395 Make Muzzle_queue_index static 2015-05-09 17:39:01 +00:00
Kp b5eae4c809 Split create_smart_children 2015-05-09 17:38:58 +00:00
Kp 08a42a68ff Pass vcobjptridx to laser_are_related 2015-05-09 17:38:58 +00:00
Kp 7e65d73e72 Factor out laser_are_related special cases 2015-05-09 17:38:58 +00:00
Kp 0d564814f5 Convert Primary_weapon to primary_weapon_index_t 2015-04-26 20:15:57 +00:00
Kp 4d046c5336 Split auto_select_weapon 2015-04-26 20:15:51 +00:00
Kp 65a0d35678 Remove bogus Int3 in object_to_object_visibility
A Future Pilot reports that find_vector_intersection can return an
unhandled fate.  When Int3 is enabled, this crashes the game.  Replace
the Int3 with a debug print.

Reported-by: A Future Pilot <http://www.dxx-rebirth.com/frm/index.php/topic,2024.msg21633.html#msg21633>
2015-04-24 01:39:35 +00:00
Kp 9d213b5282 Wrap player_has_weapon return type 2015-04-19 04:18:50 +00:00
zico 1fd7cb8929 Fusion cannon in Descent 1 was nerfed for Multiplayer after it was made stronger in 1.1 patch. This is fine but players expressed it being not desirable for Coop - which makes sense to me. This fix only applies the nerf to non-Coop games. 2015-04-08 15:05:03 +02:00
Kp 9157e5f970 Use enum class for player_awareness_type_t 2015-04-02 02:36:53 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp 91d31b1952 Wrap object signature in subtype 2015-03-22 18:49:21 +00:00
Kp 2c09f9fa90 Propagate special types for distance/magnitude 2015-03-12 02:21:19 +00:00
Kp 32b9202e1f Watch missiles when available 2015-02-14 22:48:28 +00:00
Kp dc8b88eed4 Convert various loops to range_for 2015-02-14 22:48:27 +00:00
Kp 078d9513e0 Pass end-of-list for ignore_obj_list 2015-02-05 03:03:51 +00:00
Kp 99a4a0ed62 Capture range_for by-value temporaries as const
Modifying a by-value temporary does not affect the underlying container,
so modifying it is almost always a bug.  Require use of a by-reference
capture when modification is desired.

sed -i -e 's/range_for\s*(\s*\(const\s\+\)\?auto\s\+\([[:alpha:]_]\)/range_for (const auto \2/g'
2015-02-05 03:03:49 +00:00
Kp c8b5fe5552 Pass find_vector_intersection arg by & 2015-01-20 02:46:42 +00:00
Kp fbac119095 Propagate use of objptridx_t 2014-12-23 04:20:27 +00:00
Kp 2d8f8b5d4a Reduce inclusion of wall.h 2014-12-22 04:35:49 +00:00
Kp cf31cc4a5d Switch Laser_render to vobjptr_t 2014-11-30 22:09:23 +00:00
Kp 5aaf847c41 Fix various -Wnarrowing errors 2014-11-26 03:39:21 +00:00
Kp d63be88eb0 Propagate use of vsegptridx_t 2014-11-23 04:58:45 +00:00
Kp a17cf6f808 Avoid slicing into objnum_t local 2014-11-20 03:00:41 +00:00
Kp 2c349136cc Avoid slicing into segnum_t local 2014-11-20 03:00:36 +00:00
Kp fda3fc33f3 Skip unnecessary sqrt for omega cannon 2014-11-11 04:25:47 +00:00
Kp d5d958af96 Add make_random_vector that returns result 2014-11-04 01:33:45 +00:00
Kp df6b4bd783 Add vm_vec_rotate that returns result 2014-11-04 01:31:22 +00:00
Kp 40eb2e6b01 Add vm_vec_scale_add that returns result 2014-11-02 03:43:57 +00:00
Kp a09fcd7753 Add vm_vec_add that returns result 2014-10-30 03:11:06 +00:00
Kp 5bb9c88979 Add vm_vec_sub that returns result 2014-10-29 03:24:31 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00
Kp c87e84217b Pass phys_apply_* vms_vector by const & 2014-10-26 21:37:34 +00:00
Kp ad717e59e8 Pass laser vectors as const & 2014-10-26 21:37:27 +00:00
Kp fdfd849bd2 Pass explode_badass_weapon position by const & 2014-10-26 21:36:31 +00:00
Kp 7e955c2c7b Pass object_create_explosion_sub position by & 2014-10-26 21:36:25 +00:00
Kp 2a5265493e Pass obj_create position vms_vector by & 2014-10-26 21:35:16 +00:00
Kp 9dea4b4d88 Pass sound vms_vector arg by & 2014-10-26 21:33:50 +00:00