Commit graph

100 commits

Author SHA1 Message Date
Kp f46a2802aa Simplify object_nearby_aux return 2015-10-18 21:01:18 +00:00
Kp 533f1cb3bb Qualify references to primary weapons 2015-10-18 21:01:18 +00:00
Kp edccaa91f6 Check return of pick_connected_segment before use 2015-09-29 02:41:22 +00:00
Kp 66da9c136e Cache do_explosion_sequence Robot_info lookups 2015-08-17 02:44:56 +00:00
zico 57b4bd0281 Community wish: If friendly fire is disabled, also protect players from explosion damage caused by friendly players. This also protects against splash damage caused by oneself. 2015-08-16 13:25:07 +02: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 13bcdcf0ca Use valptr for fireball.cpp 2015-07-12 01:04:19 +00:00
Kp 9125ae32cd Make objnum unsigned 2015-06-13 22:42:15 +00:00
Kp f6d6f221ad Fix array underread for D1 bosses in D2 2015-06-07 16:21:37 +00:00
Kp ea2c2df250 Update open-coded tests for segment_none 2015-05-28 03:08:39 +00:00
Kp bfeddc3501 Test for exploding wall damaging control center
apply_damage_to_controlcen requires a valid `who`, but exploding walls
have none.

Fixes: 3eb8f4813e ("Pass vcobjptr_t to apply_damage_to_controlcen")
2015-05-09 19:55:58 +00:00
Kp 1cdc43d71a Split object_create_egg 2015-05-09 17:39:01 +00:00
Kp d9c3005134 Factor out egg skip logic 2015-05-09 17:39:00 +00:00
Kp b5eae4c809 Split create_smart_children 2015-05-09 17:38:58 +00:00
Kp b32298df5a Rewrite powerup cap code to centralize logic 2015-04-19 04:18:53 +00:00
Kp b88c232f9f Use powerup_type_t for *_weapon_to_powerup 2015-04-19 04:18:53 +00:00
Kp 516b8b2397 Reduce collide.h includes 2015-04-19 04:18:51 +00:00
Kp 9d213b5282 Wrap player_has_weapon return type 2015-04-19 04:18:50 +00:00
Kp 5ae5033fed Use enum for AIB constants 2015-04-02 02:36:57 +00:00
Kp 6b6eaef226 Include polyobj.h from robot.h
Swap the inclusion order since all robots are polyobjects, but not all
polyobjects are robots.
2015-04-02 02:36:57 +00:00
Kp 9157e5f970 Use enum class for player_awareness_type_t 2015-04-02 02:36:53 +00:00
Kp 2c09f9fa90 Propagate special types for distance/magnitude 2015-03-12 02:21:19 +00:00
Kp a9a330bf3f Use array<> for expl_wall_list
Fixes: 125d9257be ("Use special type names for segment/object numbers")
2015-02-28 19:36:01 +00:00
zico 600d9b8685 Removed conditions for Endlevel_sequence in Multiplayer as it is not set - except for multi data where it was rather governed by NETSTAT_ENDLEVEL 2015-02-22 17:31:06 +01: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 e9761bed40 Optimize object_nearby_aux 2015-01-20 02:46:42 +00:00
Kp ff493fcfce Inline vm_vec_make 2015-01-12 00:26:02 +00:00
Kp fbac119095 Propagate use of objptridx_t 2014-12-23 04:20:27 +00:00
Kp 51b6fb1c95 Return get_side_verts by value 2014-12-14 05:23:00 +00:00
Kp d63be88eb0 Propagate use of vsegptridx_t 2014-11-23 04:58:45 +00:00
Kp 2c349136cc Avoid slicing into segnum_t local 2014-11-20 03:00:36 +00:00
Kp 40eb2e6b01 Add vm_vec_scale_add that returns result 2014-11-02 03:43:57 +00:00
Kp ec51d24ff8 Switch do_exploding_wall_frame vms_vector* to & 2014-11-02 03:42:34 +00:00
Kp 6d61198130 Pass compute_segment_center vector by & 2014-10-30 03:32:51 +00:00
Kp c0004cf4bd Pass pick_random_point_in_seg vector by & 2014-10-30 03:32:38 +00:00
Kp 8a89eff0bb Pass compute_center_point_on_side vector by & 2014-10-30 03:32:27 +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 8a0582766a Pass drop_powerup vector by const & 2014-10-28 01:46:07 +00:00
Kp c87e84217b Pass phys_apply_* vms_vector by const & 2014-10-26 21:37:34 +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
Kp a32547af16 Pass position-related vms_vector arg by & 2014-10-22 02:46:03 +00:00
Kp fb641b3250 Wrap object iteration idiom 2014-10-12 23:05:46 +00:00
Kp 6b93309ae5 Pass vm_vec_make arg by & 2014-10-02 03:02:35 +00:00
Kp 73545f1dab Pass vm_vec_normalized_dir_quick arg by & 2014-10-01 02:28:41 +00:00
Kp 1fff2db9a8 Pass vm_vec_dist_quick arg by & 2014-10-01 02:28:41 +00:00