feat(server): achievements pay out server-side, snapshots carry opponent connection state
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user