Closed Nathaniel-Wu closed 1 year ago
It seems like your changes interfere with some basic functionality. For example: Last Lap time, Max Speed, Min Body Height are not longer logged correctly. This is what I saw when I was racing with your branch yesterday.
I have added a manual recording switch for replays with #6
It seems like your changes interfere with some basic functionality. For example: Last Lap time, Max Speed, Min Body Height are not longer logged correctly. This is what I saw when I was racing with your branch yesterday.
I'm not sure why it does that, I only added a recvtime
field to GTData
, and other parts of run()
is stateless, all my changes do is determine whether the in_race
field should actually be True
when the raw value is False
, it should not affect other parts of your program. The only possibility I can think of is that you used some fields of GTData
not by field identifier but by bytes offsets or typecasted it to something else (I don't even know if you can do these things in python), and my added recvtime
field interferes that.
An attempt to restore the capability to use the tool with the replay mode. Based on the discovery I posted here.
The only thing this fix does is determine what the player is doing based on the context of the telemetry stream, and force the
GTData.in_race
field to beTrue
if we find that the player is in replay mode. The rest of the code base is untouched. Hopefully nothing is broken.Some constants might need a bit of tweaking down the line, but it should work most of the time, with two caveats:
In both cases, just quit and restart the replay.