Bradley Bell
e0b3f4f1b4
use <cstdlib> instead of <stdlib.h>
...
to use definitions in the std namespace
2015-02-05 16:54:15 -08: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
673a711461
Remove vm_angles_2_matrix return value
2015-02-05 03:03:51 +00:00
Kp
2daaacaa26
Move robot_points onto stack
2015-02-05 03:03:50 +00:00
Kp
1c58627aa3
Remove unused cos from fix_fastsincos
2015-02-05 03:03:50 +00:00
Kp
4f11c2516f
Add convenience methods fix_sin, fix_cos
2015-02-05 03:03:50 +00:00
Kp
8f5e6df9a5
Use array<> for Side_to_verts
2015-02-05 03:03:50 +00:00
Kp
ddd81962b7
Reduce duplication in find_next_item_*
2015-02-05 03:03:49 +00:00
Kp
2ef26b3a41
Remove unnecessary multiplication in pause time
2015-02-05 03:03:49 +00:00
Kp
4c8f3a47b5
Convert frequently used casts to C++ casts
2015-02-05 03:03:49 +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
3045f0fbe0
Use MSG_DONTWAIT when available
2015-02-05 03:03:48 +00:00
Kp
ae0a00a893
Return timer_query() from timer_update()
...
Most timer_update sites immediately query the timer, so return it to
save them the call.
2015-02-05 03:03:48 +00:00
Kp
ffa1efc468
Rework net_udp_process_pong
...
Fix order of parameter validation. Remove useless test on constant i.
Handle out of range delta.
2015-02-05 03:03:48 +00:00
Kp
147fa18fdf
Use std::sort in multi_sort_kill_list
2015-02-03 00:37:08 +00:00
Kp
b8d4d6d245
Move strings to end of info
2015-02-03 00:37:08 +00:00
Kp
c256af92af
Fix off-by-one ntstring copying
2015-02-01 23:50:02 +00:00
Kp
156e59a094
Unify Windows/non-Windows socket creation
2015-02-01 23:50:02 +00:00
Kp
6c857b038d
Undefine Station,RobotCenters,Vertices,Segments,Objects at level load
2015-02-01 23:07:18 +00:00
Kp
faa2493e74
Validate UDP host port
2015-02-01 23:07:18 +00:00
Kp
36cd5404d4
Avoid spamming flag changes on headlight cycling
2015-01-29 04:27:37 +00:00
Kp
1985f7f295
Pass rle_swap_0_255 arg by &
2015-01-29 04:27:37 +00:00
Kp
27aeb6764d
Pass rle_remap arg by &
2015-01-29 04:27:37 +00:00
Kp
912253ab00
Pass gr_bitmap_rle_compress arg by &
2015-01-29 04:27:37 +00:00
Kp
035c99029e
Use ntstring for hudmsg
2015-01-29 04:27:36 +00:00
Kp
d4117871a1
Use range_for for intro movies
2015-01-29 04:27:36 +00:00
Kp
0868df1637
Use explicit swap for get_verts_for_normal
2015-01-29 04:27:36 +00:00
Kp
cd76870ecc
Return find_hitpoint_uv u,v by value
2015-01-29 04:27:36 +00:00
Kp
46252fae4d
Optimize compute_average_rgb
...
Reduce variable reloads. Reduce memory footprint. Add support for
memory poison detection.
2015-01-29 04:27:36 +00:00
Kp
f4517dc0bd
Reduce inclusion of segment.h
2015-01-29 04:27:36 +00:00
Kp
e30df66462
Remove gauges.h #include "piggy.h"
2015-01-29 04:27:35 +00:00
Kp
f31e9f76e0
Remove textures.h #include "piggy.h"
2015-01-29 04:27:35 +00:00
Kp
b031e449de
Make equal_space a preprocessor constant
2015-01-29 04:27:35 +00:00
Kp
c2aa2c2e4b
Rename space to space_tab
...
Name space is too simple and causes conflicts elsewhere.
2015-01-29 04:27:35 +00:00
Kp
7b0442e238
Fix crash on start of demo playback
...
PHYSFSX_openReadBuffered returns an RAIIPHYSFS_File, but infile was a
PHYSFS_file. This caused the file to close instantly, leaving infile
dangling.
2015-01-29 00:56:21 +00:00
Kp
0ecea9717f
Fix crash on end of demo recording
2015-01-29 00:52:35 +00:00
Kp
3ee97b1dcd
Fix crash on start of demo recording
...
PHYSFSX_openWriteBuffered returns an RAIIPHYSFS_File, but outfile was a
PHYSFS_file. This caused the file to close instantly, leaving outfile
dangling.
2015-01-29 00:45:18 +00:00
Kp
aa2431dc7d
Use range_for in load_bitmap_replacements
2015-01-28 03:42:53 +00:00
Kp
ff4a0ccd70
Fix RAIIdmem array usage
...
Some RAIIdmem instances managed a T[], but were declared to manage a T.
2015-01-28 03:42:53 +00:00
Kp
d2f0bdc867
Exit cleanly on bad command line arguments
2015-01-28 03:42:53 +00:00
Kp
cd14d2163b
Optimize obj_get_signature
2015-01-28 03:42:52 +00:00
Kp
4a2c9325bb
Fix various uninitialized accesses
2015-01-28 03:42:52 +00:00
Kp
0ea95e87e7
Pass array<> to create_bfs_list
2015-01-28 03:42:52 +00:00
Kp
bb60f64001
Undefine object instances at construction
2015-01-28 03:42:52 +00:00
Kp
fa73ca8a17
Pass gr_remap_bitmap_good arg by &
2015-01-25 05:32:45 +00:00
Kp
d8f699320b
Pass iff_parse_bitmap arg by &
2015-01-25 05:32:45 +00:00
Kp
86158f605a
Pass convert_rgb15 arg by &
2015-01-25 05:32:44 +00:00