diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-07 22:17:34 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-08 04:02:37 +0900 |
| commit | f7f511326aaa5175501494c2566ec43166e81a7c (patch) | |
| tree | 633357667ecd1f65d1ebf1999f440654d92382f2 /backend/game/hub.go | |
| parent | 6bb6071ec1dce0cce59df0cb1c38168918061041 (diff) | |
| download | iosdc-japan-2024-albatross-f7f511326aaa5175501494c2566ec43166e81a7c.tar.gz iosdc-japan-2024-albatross-f7f511326aaa5175501494c2566ec43166e81a7c.tar.zst iosdc-japan-2024-albatross-f7f511326aaa5175501494c2566ec43166e81a7c.zip | |
feat(backend): fix an issue where testcase execution results are sent to all players
Diffstat (limited to 'backend/game/hub.go')
| -rw-r--r-- | backend/game/hub.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/game/hub.go b/backend/game/hub.go index 8afc802..84f7a84 100644 --- a/backend/game/hub.go +++ b/backend/game/hub.go @@ -171,6 +171,9 @@ func (hub *gameHub) run() { } case executionResult := <-hub.testcaseExecution: for player := range hub.players { + if player.playerID != executionResult.Task.UserID { + continue + } player.s2cMessages <- &playerMessageS2CExecResult{ Type: playerMessageTypeS2CExecResult, Data: playerMessageS2CExecResultPayload{ |
