Kp
1ca482d587
Factor out clamping AI times during save
...
Also, fix a bug that time_player_sound_attacked was clamped, stored, and
then immediately overwritten with an unclamped value.
2021-11-01 03:37:20 +00:00
Kp
29b619db99
Pass random generator to pick_random_point_in_seg
2021-11-01 03:37:20 +00:00
Kp
3862edfb6c
Use enum class for segment_special
2021-11-01 03:37:19 +00:00
Kp
12a0f8e8e0
Use enum class for wall_state
2021-11-01 03:37:19 +00:00
Kp
f64ed06a9d
Use enum class for wall flag constants
2021-11-01 03:37:19 +00:00
Kp
9823c2e33c
Fix blastable wall test
...
WALL_BLASTABLE is a property of the wall flags, not the wall state.
2021-11-01 03:37:19 +00:00
Kp
3d878ce04d
Expand macro Last_level
2021-11-01 03:37:19 +00:00
Kp
49dee72766
Preserve type of vm_vec_mag return value
...
Defer converting to `fix` until necessary.
2021-09-19 10:53:48 +00:00
Kp
983ad86e4b
Use enum class for trigger number
2021-09-04 12:17:14 +00:00
Kp
5ca182f4da
Link robot sounds to the object, not a position
...
This should produce more reasonable results if a robot is moved rapidly
while the sound plays.
2021-06-28 03:37:51 +00:00
Kp
20372ad3f3
Reduce intensity of Robot_sound_volume
...
Recent work increased the effective intensity of various sounds. Reduce
this one to compensate.
2021-06-28 03:37:51 +00:00
Kp
028f4f8a56
Use structured bindings to access enumerated ranges
2021-06-28 03:37:50 +00:00
Kp
eaf319ac4e
Inline guidebot search into create_buddy_bot
...
Remove use of a predicate/std::find_if, and switch to structured
bindings to access the enumerated range.
2021-06-28 03:37:50 +00:00
Dmitry Grigoryev
fbd05a1592
optimize include files (include what you use)
2021-02-06 21:38:50 +01:00
Kp
b51da25a42
Add quick-exit path for robot awareness in no-robot games
...
If no awareness events are pending, skip scanning objects for robots
to inform about the awareness events.
2021-01-17 22:23:22 +00:00
Kp
93bef60b79
Improve D1 emulation of process_awareness_events
...
When D2 emulates D1, use the D1 recursion limit.
2021-01-17 22:23:22 +00:00
Kp
80fc124a63
Remove unnecessary definitions of static member variables
...
C++17 permits, but deprecates, this form. Remove it to simplify the
code.
2020-12-27 22:03:09 +00:00
Kp
e261ca2884
Use enum class for weapon_info::matter
2020-12-20 20:39:07 +00:00
Kp
b1b2300c7d
Use enum class for wall_key
2020-12-19 16:13:26 +00:00
Kp
47c33cbd55
Use enum class for WALL_IS_DOORWAY_FLAG
...
This reduces the size of the debug information substantially.
2020-12-19 16:13:26 +00:00
Kp
ffb653c0b8
Pass control_info & to various functions
...
Switch from a direct global reference to passing control_info& as a
parameter.
2020-10-12 03:28:26 +00:00
Kp
de4efc4f46
Qualify more uses of shared_segment members
2020-08-24 01:31:28 +00:00
Kp
038c6aef4d
Move d_level_unique_object_state to a separate header
...
This is required to untangle the cross-inclusion of object.h and
morph.h.
2020-08-10 03:45:14 +00:00
Kp
5245b1c4a3
Rename object::control_type to control_source
...
gcc and clang disagree about how to disambiguate when an identifier is
both a typename and a member. Avoid the disagreement by renaming the
member.
Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/issues/532 >
2020-08-10 03:45:13 +00:00
Kp
9e2543ecbf
Use enum class for object control_type
2020-08-06 03:47:56 +00:00
Kp
3f951cf45f
Use A.size() or std::size instead of sizeof(A)/sizeof(A[0])
2020-07-05 23:34:33 +00:00
Kp
a4f2edfaa9
Move LevelSharedVertexState into d_level_shared_segment_state
2020-05-17 23:35:25 +00:00
Kp
53761500f1
Qualify uses of std::array
2020-05-02 21:18:42 +00:00
Kp
9cee93abb1
Require support for C++14 std::exchange
2020-05-02 21:18:42 +00:00
Kp
714c13b3c1
Move WallAnims into d_game_shared_state
2020-04-04 19:30:22 +00:00
Kp
fd134851d1
Pass context to morph_start
2020-02-26 05:07:34 +00:00
Kp
74271443ed
Add definition of d_level_shared_boss_state::D1_Boss_*_interval
...
These variables are used, but optimized builds eliminate all reference
to their address, so the build normally succeeds. Unoptimized builds
retain references to the address, so a definition is required for them.
Reported-by: tycho <https://github.com/dxx-rebirth/dxx-rebirth/issues/496 >
Fixes: 595c3ca086
("Move Boss_cloak_interval to d_level_shared_boss_state")
Fixes: c61dee7e6a
("Move Boss_teleport_interval to d_level_shared_boss_state")
2020-02-06 03:22:45 +00:00
Kp
c9b1b5b1ec
Use susegment for WALL_IS_DOORWAY
2019-12-27 02:02:23 +00:00
Kp
36873ec12d
Simplify maybe_ai_do_actual_firing_stuff
...
The second parameter always points to a substructure in the first
parameter. Remove the second parameter.
2019-12-22 05:34:08 +00:00
Kp
30091902af
Simplify valptridx types where possible
...
Switch valptridx::ptr to a reference type.
Switch valptridx::ptridx to a reference type or to ::ptr.
Fix up uses of operator-> accordingly.
2019-12-22 05:34:08 +00:00
Kp
c3265f6b90
Convert segment &
to susegment
where possible
2019-12-22 05:34:08 +00:00
Kp
f0faac66d4
Move Seismic_tremor_magnitude to d_level_unique_seismic_state
2019-08-06 02:59:41 +00:00
Kp
ef0e64d421
Move awareness events to d_level_unique_robot_awareness_state
2019-08-06 02:59:40 +00:00
Kp
03214c0e6f
Fix original game bug that meant to reset camera flag, but did not
2019-08-06 02:59:40 +00:00
Kp
215252b8ca
Fold Final_boss_is_dead into Final_boss_countdown_time
2019-08-06 02:59:40 +00:00
Kp
3d8c02fefa
Move Final_boss_is_dead to d_game_unique_state
2019-08-06 02:59:40 +00:00
Kp
be84013494
Move Boss_hit_time to d_level_unique_boss_state
2019-08-06 02:59:40 +00:00
Kp
0a74eb6989
Move Boss_hit_this_frame to d_level_unique_boss_state
2019-08-06 02:59:40 +00:00
Kp
75440153a0
Move Boss_dying_sound_playing to d_level_unique_boss_state
2019-08-06 02:59:40 +00:00
Kp
a0c242c46f
Move Boss_dying_start_time to d_level_unique_boss_state
2019-08-06 02:59:40 +00:00
Kp
63d869fa0c
Move Boss_dying to d_level_unique_boss_state
2019-08-06 02:59:40 +00:00
Kp
4ec96337b6
Move Last_teleport_time to d_level_unique_boss_state
2019-08-06 02:59:40 +00:00
Kp
69404ebc6e
Move Boss_cloak_start_time to d_level_unique_boss_state
2019-08-06 02:59:40 +00:00
Kp
184be218b7
Emulate D1 bosses more accurately
...
Use D1 timing for gating, cloaking, and teleporting
2019-08-06 02:59:40 +00:00
Kp
41f4e84261
Move Stolen_item_index into d_thief_unique_state
2019-07-16 04:00:50 +00:00