From e48a96cf932be2a46adc721f4c5089fd8ab20642 Mon Sep 17 00:00:00 2001 From: mkwcat Date: Thu, 4 Jan 2024 16:52:43 -0500 Subject: [PATCH] QR2: Don't increment join index for existing players --- qr2/group.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qr2/group.go b/qr2/group.go index 345042b..aaa1169 100644 --- a/qr2/group.go +++ b/qr2/group.go @@ -75,11 +75,14 @@ func processResvOK(moduleName string, matchVersion int, reservation common.Match logging.Notice(moduleName, "Created new group", aurora.Cyan(group.GroupName)) } - // TODO: Check if the sender is the actual server (host) once host migration works - // Keep group ID updated group.GroupID = resvOK.GroupID + if group.Players[destination] { + // Player is already in the group + return true + } + logging.Info(moduleName, "New player", aurora.BrightCyan(destination.Data["dwc_pid"]), "in group", aurora.Cyan(group.GroupName)) group.LastJoinIndex++