[FIX] fix double drawing

This commit is contained in:
Sem van der Hoeven
2020-10-23 20:33:47 +02:00
parent 3c0f5018db
commit 3015c0312f
3 changed files with 10 additions and 3 deletions

View File

@@ -176,7 +176,8 @@ namespace Server.Models
coords = JSONConvert.getCoordinates(payload),
color = JSONConvert.getCanvasDrawingColor(payload)
};
serverCom.SendToLobby(serverCom.GetLobbyForUser(User),JSONConvert.GetMessageToSend(JSONConvert.CANVAS,canvasData));
//serverCom.SendToLobby(serverCom.GetLobbyForUser(User),JSONConvert.GetMessageToSend(JSONConvert.CANVAS,canvasData));
serverCom.SendCanvasDataToLobby(serverCom.GetLobbyForUser(User), User.Username, JSONConvert.GetMessageToSend(JSONConvert.CANVAS, canvasData));
break;
case JSONConvert.CANVAS_RESET:

View File

@@ -174,7 +174,8 @@ namespace Server.Models
{
foreach (ServerClient sc in serverClientsInlobbies[l])
{
sc.sendMessage(message);
if (sc.User.Username != username)
sc.sendMessage(message);
}
break;
}