feat(server): achievements pay out server-side, snapshots carry opponent connection state
This commit is contained in:
@@ -124,7 +124,7 @@ function createLobby({ runner, economy, matches, now = () => Date.now() }) {
|
||||
const won = res.winner === seat;
|
||||
const r = economy.reward(pl.uid, Object.assign({ won, winner: res.winner === -1 ? -1 : won ? 0 : 1, reason: res.reason }, sm));
|
||||
tell(pl.uid, { t: 'match.end', matchId: room.id, seat, result: res, summary: sm,
|
||||
reward: { money: r.money, fame: r.fame, lines: r.lines }, save: r.save });
|
||||
reward: { money: r.money, fame: r.fame, lines: r.lines, ach: r.ach }, save: r.save });
|
||||
const p = players.get(pl.uid); if (p) setState(p, 'idle');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user