mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 00:14:00 +00:00
fix(multiplayer): reconcile authoritative initial connections
This commit is contained in:
@@ -63,11 +63,13 @@ WHERE assignments.allocation_id = EXCLUDED.allocation_id
|
||||
AND assignments.expires_at = EXCLUDED.expires_at
|
||||
AND assignments.revision = EXCLUDED.revision`
|
||||
|
||||
const AssignmentSelectSQL = `SELECT match_id, player_id, allocation_id, server_id,
|
||||
slot, region, client_build, protocol_version, transport, endpoint,
|
||||
join_authorisation, manifest_digest, expires_at, revision
|
||||
FROM assignments
|
||||
WHERE match_id = $1 AND player_id = $2 AND expires_at > $3`
|
||||
const AssignmentSelectSQL = `SELECT a.match_id, a.player_id, a.allocation_id, a.server_id,
|
||||
a.slot, a.region, a.client_build, a.protocol_version, a.transport, a.endpoint,
|
||||
a.join_authorisation, a.manifest_digest, a.expires_at, a.revision
|
||||
FROM assignments a
|
||||
JOIN matches m ON m.match_id = a.match_id AND m.server_id = a.server_id
|
||||
WHERE a.match_id = $1 AND a.player_id = $2 AND a.expires_at > $3
|
||||
AND m.state IN ('ASSIGNMENT_READY', 'ASSIGNED', 'CONNECTING', 'LIVE')`
|
||||
|
||||
const AssignmentRosterSelectSQL = `SELECT allocation_id, server_id, join_authorisation
|
||||
FROM assignments
|
||||
|
||||
Reference in New Issue
Block a user