Skip to content

local_frame_advantage bigger than i8::MAX #35

@cscorley

Description

@cscorley

Describe the bug
Calculations for quality reports use i8 and can be too small during stress testing.

To Reproduce
Steps to reproduce the behavior:

  • Using https://github.com/cscorley/bevy_ggrs_rapier_example
  • Compile using release build
  • Setup a game and introduce aggressive network lag such that 127+ "Skipping a frame: PredictionThreshold" will be produced on the clients
  • Observe panic thread 'main' panicked at 'local_frame_advantage bigger than i8::MAX: TryFromIntError(())', C:\Users\cscorley\scoop\persist\rustup\.cargo\git\checkouts\ggrs-151f8bd9eb75dc5d\9e4a20a\src\network\protocol.rs:512:18

Expected behavior
Non-panic, just keep skipping frames.

Screenshots
I was testing a game with clumsy on Windows, using this configuration.
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Version: main branch, 9e4a20a

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions