p2r3 / epochtal

Portal 2 tournament framework
https://epochtal.p2r3.com/
GNU General Public License v3.0
8 stars 4 forks source link

Demos not accepted if stopped with `stop` command #68

Closed p2r3 closed 4 months ago

p2r3 commented 4 months ago

The system fails to parse the time of demos that are missing the SAR speedrun timer summary, which happens if you stop a demo manually before finishing the run. This makes sense, because that's the only reliable way of retrieving a demo's time. This shouldn't change for competitive categories - there's no case in which you'll run stop sooner than either finishing the speedrun or running sar_speedrun_finish. However, for non-scored categories, demos should fall back to the header's tick count. It's accurate enough in most cases, as long as the demo isn't corrupted (which gets rejected anyway) and as long as comparing apples to apples isn't important (which it isn't in non-scored categories).

https://github.com/p2r3/epochtal/blob/0e57e17b76581427db0ae00a1380849f84410cba/util/demo.js#L191

Since the demo.js util on its own is category-agnostic, this would require the parsed output to include some indicator that the ticks it provides aren't from the SAR timer.