Skip to content

fix: a round restore no longer records false stats or plays over recorded rounds - #290

Merged
lukepolo merged 7 commits into
mainfrom
bug/deafcs-round-restore
Nov 3, 2026
Merged

lukepolo merged 7 commits into
mainfrom
bug/deafcs-round-restore

Conversation

@lukepolo

@lukepolo lukepolo commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Restoring a round could leave false stats behind, lose a real round, or let a restarted server play over rounds the backend had already recorded.

  • Stats from a backup load are dropped where game events are published, so kills, damage, utility and bomb events are all covered.
  • A passed recovery vote keeps the match held until its round loads, and returns to the hold and the vote if the load can't happen or 5 minutes pass. Only a declined vote replays the map.
  • A round that ends during a .reset vote is kept if the vote fails, and dropped if it passes, because the restore is undoing it.
  • A failed restore write no longer leaves backups off, Restart Map clears all restore state, and a hold, owed load or open vote ends with its map.
  • A round the backend has no row for is never offered, because it can never load. A hold whose backup is gone falls back to the newest round the backend kept; with none left and rounds recorded ahead, the match stays paused until an admin uses Restart Map.
  • Differences from main: backups stay off during a recovery vote; .reset, .pause and timeouts are also blocked while a load is owed; a passed offline vote turns backups on; the pending result is cleared on every load.

https://github.com/DEAFCS/game-server/commit/b974820f

…ds with its map

A disk file above the backend's rows could never restore, because the api
raises on a round with no row and answers nothing. Such files are now ignored
when choosing the round to hold, which removes from_disk and RoundToHoldAgain.
A file can still fill in a row that exists, and offline keeps its disk rounds.

A hold no longer comes back for a round whose backup is gone: it ends and the
players are told. An open vote is abandoned when its map changes.
… playing over them

Ending the hold when its round's backup was gone turned backups on and let the
match resume with recorded rounds still ahead of the server.

A hold now falls back to the newest round the backend can load. With none left
and rounds recorded ahead, the match stays held on NothingToLoad until Restart
Map, with players told once and no vote offered. It only ends when nothing is
recorded ahead of the server.
@lukepolo
lukepolo merged commit faa482b into main Nov 3, 2026
7 of 8 checks passed
@lukepolo
lukepolo deleted the bug/deafcs-round-restore branch November 3, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant