Commit graph

68 commits

Author SHA1 Message Date
Kp 65810d5c77 Skip sqrt in check_vector_to_sphere_1 2015-03-12 02:21:20 +00:00
Kp 707b69220d Skip sqrt,square in check_vector_to_sphere_1 2015-03-12 02:21:20 +00:00
Kp f89262054f Skip sqrt in check_sphere_to_face 2015-03-12 02:21:20 +00:00
Kp 5f409c4948 Move quick checks up in check_sphere_to_face 2015-03-12 02:21:20 +00:00
Kp 337837ec15 Skip sqrt in special_check_line_to_face 2015-03-12 02:21:20 +00:00
Kp 76d383261c Return vm_distance_squared from check_vector_to_sphere_1 2015-03-12 02:21:20 +00:00
Kp 2c09f9fa90 Propagate special types for distance/magnitude 2015-03-12 02:21:19 +00:00
Kp 661e676688 Combine object_intersects_wall_d outputs
Drop unused face.
2015-02-14 22:48:27 +00:00
Kp f27a79fe2c Combine FQ_GET_SEGLIST scan/add 2015-02-05 03:03:51 +00:00
Kp 078d9513e0 Pass end-of-list for ignore_obj_list 2015-02-05 03:03:51 +00:00
Kp b070c2a7b3 Skip find_plane_line_intersection numerator when den==0 2015-02-05 03:03:51 +00:00
Kp 4108c9f3c6 Short-circuit check_sphere_to_face
Previously, the code set itype=IT_POINT, then picked a closest point.
If the closest point was v0 or v1, itype stayed IT_POINT, otherwise it
became IT_EDGE.  If itype==IT_POINT, then the function returns
	(itype == IT_POINT) ? IT_NONE : itype;
	=>
	IT_NONE
for (dist <= rad).  Otherwise, it returns IT_NONE.  Short-circuit this
by returning IT_NONE without computing the distance.
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 cd76870ecc Return find_hitpoint_uv u,v by value 2015-01-29 04:27:36 +00:00
Kp c8b5fe5552 Pass find_vector_intersection arg by & 2015-01-20 02:46:42 +00:00
Kp e42b1f5b71 Return vertex_array_list_t from create_all_vertnum_lists 2014-12-14 05:23:00 +00:00
Kp 1960a2ebad Return vertex_array_list_t from create_abs_vertex_lists 2014-12-14 05:23:00 +00:00
Kp 9aa539c062 Return texmerge_get_cached_bitmap result by & 2014-11-30 22:09:19 +00:00
Kp 4cadc18e52 Pass merge_textures_new arg by & 2014-11-30 22:09:18 +00:00
Kp 968f7ddc97 Pass gr_gpixel arg by & 2014-11-30 22:09:18 +00:00
Kp dd4a0db47f Pass rle_expand_texture arg as const & 2014-11-30 22:09:17 +00:00
Kp d63be88eb0 Propagate use of vsegptridx_t 2014-11-23 04:58:45 +00:00
Kp 0da289fca8 Pass fvi_sub ints by & 2014-11-21 03:11:11 +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 40eb2e6b01 Add vm_vec_scale_add that returns result 2014-11-02 03:43:57 +00:00
Kp 742c67b935 Pass fvi_* args by & 2014-11-02 03:42:50 +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 9a32e151ff Pass check_effect_blowup vms_vector arg by & 2014-10-26 21:36:35 +00:00
Kp a79bb365f9 Pass get_seg_masks arg by & 2014-10-26 21:28:38 +00:00
Kp a32547af16 Pass position-related vms_vector arg by & 2014-10-22 02:46:03 +00:00
Kp 6299bb099a Remove unused file/line from create_abs_vertex_lists
Exception handling generates automatic line information.
2014-10-16 02:47:17 +00:00
Kp a99466f8c8 Pass vm_vec_crossprod arg by & 2014-10-01 02:28:42 +00:00
Kp b5f443f21e Pass vm_vec_normalized_dir arg by & 2014-10-01 02:28:41 +00:00
Kp 0b691365a7 Pass vm_vec_copy_normalize arg by & 2014-10-01 02:28:41 +00:00
Kp ac39749382 Pass vm_vec_dist arg by & 2014-10-01 02:28:41 +00:00
Kp 05a91f9b58 Pass vm_vec_scale_add2 arguments by & 2014-09-28 21:43:14 +00:00
Kp 4104bf4f11 Pass vm_vec_scale_add arguments by & 2014-09-28 21:43:14 +00:00
Kp 00b59c3058 Pass vm_vec_dot arguments by & 2014-09-28 21:11:48 +00:00
Kp 321bbe37d8 Pass vm_vec_sub arguments by & 2014-09-28 21:11:45 +00:00
Kp 2107b52764 Pass vm_vec_add arguments by & 2014-09-28 21:11:40 +00:00
Kp 6c30bb5d98 Pass vm_vec_scale2 dest by & 2014-09-28 21:11:36 +00:00
Kp a550673639 Pass vm_vec_normalize v by & 2014-09-28 21:11:03 +00:00
Kp 1e6bf36e20 Pass vm_vec_mag v by const& 2014-09-28 21:11:03 +00:00
Kp 02e2e77ee6 Tighten processing of WALL_IS_DOORWAY flags 2014-09-06 22:26:11 +00:00
Kp fc30079c0b Remove use of vms_vector_array in check_point_to_face 2014-08-22 02:26:51 +00:00
Kp 39d29e17fa Use pointer-to-member access in find_hitpoint_uv 2014-08-22 02:22:10 +00:00
zico ee828c9b15 Removed conditional handling of collision point calculation from check_vector_to_sphere_1 due to testing showing too many problems which could not be solved without drastic changes. Calculate valid collision point in collide.cpp if necessary (CED, you were right :)) 2014-08-18 12:09:54 +02:00
zico cc2f1cb040 Have objects with PF_PERSISTENT (never supposed to stop) flag also trigger original condition in check_vector_to_sphere_1 2014-08-18 10:48:02 +02:00