feat(server): achievements pay out server-side, snapshots carry opponent connection state

This commit is contained in:
Benjamin Oezcan
2026-11-19 02:09:12 +01:00
parent 85a19ba242
commit 0202a08b8d
5 changed files with 13 additions and 4 deletions

View File

@@ -94,7 +94,8 @@ class Room {
s.events = this.evBuf.slice(-48); // events since the last snapshot
const snap = RC.Proto.packSnap(s, this.tickN, this.acks);
s.events = []; this.evBuf.length = 0;
for (const seat of [0, 1]) this.send(seat, Object.assign({ t: 'snap' }, snap));
const away = [!!this.away[0], !!this.away[1]];
for (const seat of [0, 1]) this.send(seat, Object.assign({ t: 'snap', away }, snap));
}
finish(result) {