Kp
bda7fef3a0
Use get_local_player to compute reference to local player
2015-07-25 23:10:46 +00:00
Kp
8bbcf497b7
Use valptr for collide.cpp
2015-07-12 01:04:19 +00:00
Kp
4a742e3fc4
Parenthesize static_assert expression
...
When static_assert is a macro, it must have two arguments as seen by the
preprocessor. Add an identity mapping to the native case to enforce
this, and fix up all the sites that break with the new rule.
2015-07-09 03:12:45 +00:00
Kp
7b1e774cb8
Hack around buggy clang constant warning
...
clang whines that static_assert(A && B) uses && with a constant operand,
but this is necessary and correct, because static_assert only takes
compile-time constant expressions. However, !!A && !!B does not warn.
Switch to !!A && !!B to silence the clang whining.
similar/main/collide.cpp:2566:63: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
static_assert(collision_result_t<OBJ_WALL, OBJ_ROBOT>::value && collision_result_t<OBJ_ROBOT, OBJ_WALL>::value, "OBJ_WALL" " " "OBJ_ROBOT");
2015-06-13 22:42:19 +00:00
Kp
7e263323bc
Simplify boss invulnerability lookup
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
b5eae4c809
Split create_smart_children
2015-05-09 17:38:58 +00:00
Kp
8d849b2b39
Wrap laser level in class
...
Move enum laser_level_t to weapon.h for the new class.
2015-04-26 20:15:56 +00:00
Kp
f15ec9c86a
Use enum for AIM constants
2015-04-26 20:15:51 +00:00
Kp
3eb8f4813e
Pass vcobjptr_t to apply_damage_to_controlcen
2015-04-22 02:44:30 +00:00
Kp
b88c232f9f
Use powerup_type_t for *_weapon_to_powerup
2015-04-19 04:18:53 +00:00
Kp
adbefd39c4
Minimize unnecessary fields passed to check_effect_blowup
2015-04-19 04:18:52 +00:00
Kp
c338862ad6
Reduce gauges.h includes
2015-04-19 04:18:51 +00:00
Kp
516b8b2397
Reduce collide.h includes
2015-04-19 04:18:51 +00:00
Kp
a9c81c5614
Move Weapon_is_energy to collide.cpp
2015-04-02 02:36:57 +00:00
Kp
5ae5033fed
Use enum for AIB constants
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
598a5e42a2
Allow granting items at player spawn
2015-03-28 17:18:02 +00:00
Kp
c5f6a115ec
Add <stdexcept> for files that throw std::runtime_error
2015-03-22 04:16:49 +00:00
Kp
2c09f9fa90
Propagate special types for distance/magnitude
2015-03-12 02:21:19 +00:00
Bradley Bell
28bd4c1650
Enable D1 boss behavior in d2x build.
...
So we get correct boss behavior when emulating D1, and 3rd party mn2s can include D1 bosses.
2015-02-08 12:26:36 -08:00
Kp
cd76870ecc
Return find_hitpoint_uv u,v by value
2015-01-29 04:27:36 +00:00
Kp
84e3a03451
Remove unused parameters
2015-01-18 01:58:33 +00:00
Kp
fbac119095
Propagate use of objptridx_t
2014-12-23 04:20:27 +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
a17cf6f808
Avoid slicing into objnum_t local
2014-11-20 03:00:41 +00:00
Kp
d5d958af96
Add make_random_vector that returns result
2014-11-04 01:33:45 +00:00
Kp
b32f5e5df3
Add vm_vec_copy_scale that returns result
2014-11-02 03:43:47 +00:00
Kp
e747e26968
Pass do_boss_weapon_collision vector by &
2014-11-02 03:41:49 +00:00
Kp
8a89eff0bb
Pass compute_center_point_on_side vector by &
2014-10-30 03:32:27 +00:00
Kp
ecb39298f1
Fix uninitialized vms_vector on player vs matcen collision
2014-10-30 03:29:29 +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
8aeeb3da0e
Pass bump_one_object vms_vector by const &
2014-10-26 21:44:38 +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
012435f5c4
Pass collide_*_and_* arg by &
...
Use const& where possible. Some are non-const due to the recent FVI
hack that resets the collision point late.
2014-10-26 21:36:40 +00:00
Kp
9a32e151ff
Pass check_effect_blowup vms_vector arg by &
2014-10-26 21:36:35 +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
84f86e68c3
Simplify collide_robot_and_controlcen
2014-10-21 03:16:50 +00:00
Kp
ad452193ad
Remove unused hostage_rescue parameter hostage_number
2014-10-17 02:05:37 +00:00
Kp
eef8bb3365
Pass collide_two_objects vms_vector arg by &
2014-10-10 02:30:13 +00:00
Kp
bcb26678e2
Remove unused hitpt on check_volatile_wall
2014-10-10 02:29:47 +00:00
Kp
6971dfbf4a
Use symbolic *_none constants for -1
2014-10-04 17:31:13 +00:00
Kp
3d6d2d3f14
Pass make_random_vector arg by &
2014-10-02 03:02:38 +00:00
Kp
1fff2db9a8
Pass vm_vec_dist_quick 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
b5949cc4a0
Pass vm_vec_copy_scale arguments by &
2014-09-28 21:43:14 +00:00
Kp
0b2636d535
Pass vm_vec_add2 arguments by &
2014-09-28 21:43:00 +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
74925e9b45
Pass vm_vec_scale dest by &
2014-09-28 21:11:05 +00:00
Kp
f12273746f
Pass vm_vec_zero v by &
2014-09-28 21:11:04 +00:00
Kp
a620a59bda
Pass vm_vec_normalize_quick v by &
2014-09-28 21:11:04 +00:00
Kp
a550673639
Pass vm_vec_normalize v by &
2014-09-28 21:11:03 +00:00
Kp
dfdd4ddd29
Pass vm_vec_mag_quick v by const&
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
7ddba1d15e
Pass vm_vec_negate v by reference
2014-09-28 21:09:37 +00:00
Kp
5149df504d
Propagate for variables in similar/main/collide.cpp
2014-09-26 02:42:08 +00:00
Kp
9eda412dff
Use symbolic constant wall_none
2014-09-21 23:05:14 +00:00
Kp
e6b9f3f923
Use typedef for player number
2014-09-21 22:10:12 +00:00
Kp
f0a1146b29
Unify MULTI_ROBOT_EXPLODE
...
Derive thief state locally. Remove unused player number. Use new
serializer.
2014-09-14 01:14:33 +00:00
Kp
0c7e5aa178
Avoid slicing obj_create return value
2014-09-08 03:24:48 +00:00
Kp
b95759aecc
Propagate use of objptridx
2014-08-23 23:53:56 +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
Kp
66cb80c343
Propagate use of objptridx
2014-08-17 20:31:18 +00:00
Kp
125d9257be
Use special type names for segment/object numbers
2014-08-13 02:57:12 +00:00
Kp
1c064b8efb
Remove unused find_hitpoint_uv l parameter
2014-08-08 02:51:02 +00:00
Kp
e30af52b91
Improve collision detection switch
2014-08-04 03:07:06 +00:00
Kp
d536832239
Fix D1 exception when killed by materialization center
...
objptridx_t rejects NULL pointers
2014-08-02 23:17:15 +00:00
Kp
dbb7be37bb
Set safe defaults for eclip in D1
2014-07-16 03:21:04 +00:00
Kp
44d1924e96
Use special type for player callsign
2014-07-05 19:20:56 +00:00
Kp
da1bd2fd08
Precompute collision tables
2014-06-24 03:40:31 +00:00
Kp
c4b31f875f
Use array<> for MarkerMessage
2014-06-22 18:53:42 +00:00
zico
ad7cb106bc
Changed custom D1X license to GPLv3
2014-06-01 19:55:23 +02:00
Kp
a2427f58b5
Use special type to reduce pointer/index conversions
2014-01-12 19:32:12 +00:00
Kp
3a889b5825
Pass objptridx_t to apply_damage_to_robot
2014-01-12 00:33:14 +00:00
Kp
b17bafa29f
Pass objptridx_t to apply_damage_to_controlcen
2014-01-12 00:33:03 +00:00
Kp
9d0cc8324e
Pass objptridx_t to net_destroy_controlcen
2014-01-12 00:32:30 +00:00
Kp
03f54571fb
Pass objptridx_t to apply_force_damage
2014-01-12 00:32:27 +00:00
Kp
6f895e1a24
Pass objptridx_t to bump_this_object
2014-01-12 00:19:12 +00:00
Kp
a31fa65872
Pass objptridx_t to bump_two_objects
2014-01-12 00:19:12 +00:00
Kp
a8aa9965e8
Pass objptridx_t to collide_*_and_*
2014-01-12 00:19:12 +00:00
Kp
8cffd14b8c
Pass objptridx_t to collide_two_objects
2014-01-11 23:19:44 +00:00
Kp
f79aebed51
Pass objptridx_t to collide_weapon_and_wall
2014-01-11 23:10:44 +00:00
Kp
1c7f58b448
Pass objptridx_t to collide_object_with_wall
2014-01-11 23:07:51 +00:00
Kp
5dcf833da6
Remove useless NULL test on robot pointer
2014-01-06 04:17:57 +00:00
Kp
9a5d0f6f09
Use symbolic values for segment/object first/none
2014-01-06 04:17:55 +00:00
Kp
67741cf603
Remove unused multi_explode_robot_sub parameter killer
2014-01-04 22:04:34 +00:00
Kp
d7d052857a
Use bitmask for hitobj_list
...
Reduces sizeof(laser_info) from 392 to 80.
2013-12-31 03:22:03 +00:00
Kp
cf5343db18
Move ai_local into ai_static
...
Eliminates a global and some pointer math.
2013-12-29 03:59:21 +00:00
Kp
4fb6990b6c
Make Stolen_items[] a C++ array
2013-12-22 01:53:26 +00:00
zico
5f005baa3b
Added MULTI_EFFECT_BLOWUP to remotely blast switches connected to triggers, ensuring sync and preventing misguided (i.e. delayed) player fire accidentially make puzzles or game progress impossible
2013-12-19 13:48:33 +01:00
Kp
022a5f8870
Fix array overstep in collide_weapon_and_wall
...
This is the same mistake as fixed in ca4f9e8b30
, but in a different
function.
2013-12-19 03:31:24 +00:00
Kp
c3dd634cce
Remove unused flag OF_HARMLESS
2013-12-07 18:41:35 +00:00
Kp
320d22aae1
Move similar/main/collide.c -> similar/main/collide.cpp
2013-12-06 03:27:30 +00:00