Skip to content

Commit bb42302

Browse files
Use the correct variables in this function
1 parent 29217cc commit bb42302

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

code/network/multi_interpolate.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ void interpolation_manager::interpolate_main(vec3d* pos, matrix* ori, physics_in
179179
// correct the ship record for player ships when an up to date packet comes in.
180180
void interpolation_manager::reinterpolate_previous(TIMESTAMP stamp, int prev_packet_index, int next_packet_index, vec3d* position, matrix* orientation, vec3d* velocity, vec3d* rotational_velocity)
181181
{
182-
// calc what the current timing should be.
183-
float numerator = static_cast<float>(_packets[_upcoming_packet_index].remote_missiontime) - static_cast<float>(stamp.value());
184-
float denominator = static_cast<float>(_packets[_upcoming_packet_index].remote_missiontime) - static_cast<float>(_packets[_prev_packet_index].remote_missiontime);
182+
// calc what the timing was previously.
183+
float numerator = static_cast<float>(_packets[next_packet_index].remote_missiontime) - static_cast<float>(stamp.value());
184+
float denominator = static_cast<float>(_packets[next_packet_index].remote_missiontime) - static_cast<float>(_packets[prev_packet_index].remote_missiontime);
185185

186186
denominator = (denominator > 0.05f) ? denominator : 0.05f;
187187

0 commit comments

Comments
 (0)