Closed timkurvers closed 1 year ago
Help Tim <3
Crash is prevented with 6f9d67ae86acad5691ea50191fe234d9c544c852, but the game clock is seemingly completely off.
Will have to investigate a bit more.
I saw a Clarity commit related to the issue, seems to be pretty much what you did. I wonder if it means that they suffer from this clock issue as well.
Yeah, that's definitely the same. I would imagine any parser that exposed m_fGameTime
in any way (like Redota does) is gonna have this clock problem.
Seems like m_flGameStartTime
is still there, but yeah no sign of m_fGameTime
or GameTime_t
in any of the new replays. Could this be related to protobufs? Clarity also updated those.
Sorry if it's entirely irrelevant, I'm pretty clueless here.
EDIT: Well, we're not the only ones looking for it...
Following, I think we could determine how many tick per second, we could just calculate based on the ticks in the replay. I thought it was 30 ticks, but seems to not be the case. I think its very close to 30.
22841 / 30 = 761.366 seconds. Which is incorrect.
22841 / 768.3334 = 29.72 ticks per second?
Yeah I remember getting this number as well - I'll double check just in case.
Do note that you have to account for m_bGamePaused
since ticks continue even when the game is paused.
Correct, but I think we may run into a problem during the pick stage. As the first number comes once the game pre-loads. So we won't know how long it took all players to load into the game successfully.
Can maybe use m_flGameStartTime
and count backwards. Depends on game mode - non turbo is 1:30 and turbo is 1:00 (IIRC).
Edit: Also have m_flPreGameStartTime
From my tests right now it's exactly 1/30, and previously fGameTime
was sent every 2 ticks.
Tick interval is part of the CSVCMsg_ServerInfo
message, but I am a bit unsure whether it's reliable.
For a sample 7.32e patch game, parser.tickInterval
holds 0.03333333507180214
, which would effectively be 29.999998435378156
ticks per second if my math is correct.
I took these values (the last is the tick value it updated) and the first value is the time in game for PreGameStartTime
So for example : 878.500061 @ 26149 * 0.033333333 = 871.63 which is about 7 seconds off the correct number.
Bit of a busy day ahead, but hope to have this implemented (with backwards compatibility) either today or tomorrow.
Fixed in 4c5fd883107ada259d185033d67238b11a06cf9e.
Version 1.7.0, with these changes, available on the website now.
Issues with patch 7.32e in ReDota:
GameTime_t
missing type definitions