Closed gelguy closed 7 years ago
https://github.com/gelguy/fateanother/commit/9bd33f6b39cd242ee1e31ec09e281e6f105b078a
Changed UI timer slightly to depend on the difference between the previous time and current time before updating itself, instead of assuming the difference is always 1.
Most behaviors remain the same. The biggest difference would be that the timers disappear at 00:00 instead of showing 00:00 for around one second more (this can be changed though).
Cannot confirm if this change fixes the bug since Panorama seems to work differently when testing locally (leading to no timer drift). Should test and check in the Test version before publishing.
The UI timers shown are inaccurate. The most obvious one would be the round timer where the round typically ends when the timer shows 2 seconds. I think this gets worse as the game goes on but cannot confirm.
This is caused by the ticking of the UI timers being handled by the Scaleform end, rather than the Lua end.
https://github.com/dun1007/fateanother/blob/da030c29ec794ce80cde9349490bc52422dd109a/content/dota_addons/fateanother/panorama/scripts/custom_game/fateanother_timer.js#L34
Compare this to the Game timer on the scoreboard.
https://github.com/dun1007/fateanother/blob/da030c29ec794ce80cde9349490bc52422dd109a/content/dota_addons/fateanother/panorama/scripts/custom_game/fateanother_scoreboard.js#L3
The current GameTime is passed as an argument. This allows the timer shown to be as close to the true GameTime as possible, rather than letting Scaleform handle it.