feat(net)!: client on server-run fights, websocket lobby, server economy (P1-5, P1-6, P1-7, P2-3, P2-4)
- net.js: REST + one WebSocket with reconnect; single-flight refresh shared across tabs; ?slot=N - lobby.js / netfight.js: server owns presence, challenges and the fight; client shows snapshots - game.js: every workshop change goes through RC.Eco via act() (server-checked online); results, rewards and achievements come from the server (match.end) - ranking/live/cloudsave on the new REST endpoints; online tournament removed until P2-6 BREAKING CHANGE: needs the new server (protocol v1); old online saves are not migrated.
This commit is contained in:
@@ -88,6 +88,7 @@
|
||||
return Object.assign({}, snap, {
|
||||
robots,
|
||||
ack: snap.ack ? snap.ack[seat] : 0,
|
||||
away: snap.away ? (seat === 0 ? snap.away.slice() : [snap.away[1], snap.away[0]]) : undefined,
|
||||
result: localResult(seat, snap.result),
|
||||
crane: Object.assign({}, snap.crane, { who: m(snap.crane.who) }),
|
||||
rockets: snap.rockets.map(k => Object.assign({}, k, { owner: m(k.owner) })),
|
||||
|
||||
Reference in New Issue
Block a user