[FIX] fixed canvas data being sent to person drawing

This commit is contained in:
Sem van der Hoeven
2020-10-23 17:44:39 +02:00
parent 2d64accf09
commit 7ce04447d0
2 changed files with 3 additions and 2 deletions

View File

@@ -176,7 +176,7 @@ namespace Server.Models
coords = JSONConvert.getCoordinates(payload),
color = JSONConvert.getCanvasDrawingColor(payload)
};
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;
}