Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make FramesFromNow() accept a float arg #416

Merged
merged 1 commit into from
Jul 3, 2024
Merged

make FramesFromNow() accept a float arg #416

merged 1 commit into from
Jul 3, 2024

Conversation

tra
Copy link
Contributor

@tra tra commented Jul 3, 2024

Well, this is embarrassing.

Most of the time FrameFromNow() is passed an integer. But there's an important call that passes a float on this check:
while (FramesFromNow(latencyTolerance) > topSentFrame) {
itsNet->FrameAction();
}

Passing latencyTolerance as an integer was truncating the LT. For example, an LT=1.5 would be treated as LT=1 and result in less than the full LT of frames being sent on time.

Well, this is embarrassing.

Most of the time FrameFromNow() is passed an integer.  But there's an important call that passes a float on this check:
    while (FramesFromNow(latencyTolerance) > topSentFrame) {
        itsNet->FrameAction();
    }

Passing latencyTolerance as an integer was truncating the LT.  For example, an LT=1.5 would be treated as LT=1 and result in
less than the full LT of frames being sent on time.
@tra tra merged commit 862a756 into main Jul 3, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant