Skip to content

Commit

Permalink
Merge pull request eesast#374 from GuoWQ222/dev
Browse files Browse the repository at this point in the history
Urgent:Spectator Message Block
  • Loading branch information
GuoWQ222 authored May 12, 2024
2 parents 3b43b98 + 02e1238 commit 67778e1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions logic/Server/RpcServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,17 @@ public override async Task AddPlayer(PlayerMsg request, IServerStreamWriter<Mess
semaDict0[request.PlayerId].Item1.Wait();
try
{
if (currentGameInfo != null)
var info = currentGameInfo.Clone();
if (info != null)
{
for (int i = currentGameInfo.ObjMessage.Count - 1; i >= 0; i--)
for (int i = info.ObjMessage.Count - 1; i >= 0; i--)
{
if (currentGameInfo.ObjMessage[i].NewsMessage != null)
if (info.ObjMessage[i].NewsMessage != null)
{
currentGameInfo.ObjMessage.RemoveAt(i);
info.ObjMessage.RemoveAt(i);
}
}
await responseStream.WriteAsync(currentGameInfo);
await responseStream.WriteAsync(info);
GameServerLogging.logger.ConsoleLog("Send!", false);
}
}
Expand Down

0 comments on commit 67778e1

Please sign in to comment.