mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 18:20:17 +01:00
back end elimination
This commit is contained in:
@@ -245,9 +245,10 @@ io.of("player").on("connection", (socket) => {
|
||||
});
|
||||
|
||||
socket.on('capture', (captureCode) => {
|
||||
let capturedTeam = game.getTeam(teamId).chasing
|
||||
if(game.capture(teamId, captureCode)) {
|
||||
sendUpdatedTeamInformations(teamId)
|
||||
sendUpdatedTeamInformations(game.getTeam(teamId).chasing)
|
||||
sendUpdatedTeamInformations(capturedTeam)
|
||||
secureBroadcast("teams", game.teams);
|
||||
}else {
|
||||
socket.emit("error", "Incorrect code")
|
||||
|
||||
Reference in New Issue
Block a user