You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #7306 from notimaginative/multi_interp_fixes
Collection of fixes for multiple issues with the multi code found by Claude AI (by way of Goober5000), plus additional issues noted by myself while checking the code. These fixes are primarily focused on the interpolation code.
These changes should not be breaking and are largely exclusive to server-side handling, but still need to be tested thoroughly before being merged. Any tests must be done with at least the server (master) using the fixes.
// probably the "hackiest" thing about this. If we were just straight simulating,
26
28
// and we now need to go back, pretend that the position we were in *was* our old packet
27
29
// and we are now going towards our new packet's physics.
28
-
if (_simulation_mode) {
30
+
if (_simulation_mode && !index_only) {
29
31
replace_packet(prev_index, pos, ori, pip); // TODO, if simulation mode was forced by the collision code, this method regresses a bug where collisions instantly kill
Copy file name to clipboardExpand all lines: code/network/multi_interpolate.h
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
structphysics_info;
8
8
9
-
constexprintPACKET_INFO_LIMIT = 4; // we should never need more than 4 packets to do interpolation. Overwrite the oldest ones if we do.
9
+
constexprsize_tPACKET_INFO_LIMIT = 4; // we should never need more than 4 packets to do interpolation. Overwrite the oldest ones if we do.
10
10
11
11
typedefstructpacket_info {
12
12
@@ -42,7 +42,7 @@ class interpolation_manager {
42
42
SCP_vector<packet_info> _packets; // all the info from the position/orientation portion of packets that we care to keep
43
43
int _source_player_index;
44
44
45
-
voidreassess_packet_index(vec3d* pos, matrix* ori, physics_info* pip); // for finding which packets from within _packets we should use
45
+
voidreassess_packet_index(vec3d* pos = nullptr, matrix* ori = nullptr, physics_info* pip = nullptr); // for finding which packets from within _packets we should use
46
46
voidreplace_packet(int index, vec3d* pos, matrix* orient, physics_info* pip); // a function that acts as a workaround, when coming out of simulation_mode
47
47
48
48
// Frame numbers that helps us figure out if we should ignore new information coming from the server because
@@ -52,6 +52,7 @@ class interpolation_manager {
52
52
int _client_info_comparison_frame; // what frame was the last cleint info received?
53
53
SCP_vector<std::pair<int,int>> _subsystems_comparison_frame; // what frame was the last subsystem information received? (for each subsystem) First is health, second is animation
54
54
int _ai_comparison_frame; // what frame was the last ai information received?
55
+
int _support_comparison_frame; // what frame was the last support information received?
0 commit comments