mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-11-25 04:35:18 +00:00
Actually broadcast instead of sending to only one person
This commit is contained in:
parent
6224234272
commit
886b57f16a
1 changed files with 4 additions and 4 deletions
|
@ -260,15 +260,15 @@ CommandHandler.RegisterCommand("tag", args => {
|
|||
await Task.Delay(realTime);
|
||||
await Task.WhenAll(
|
||||
Parallel.ForEachAsync(seekers, async (seeker, _) =>
|
||||
await seeker.Send(new TagPacket {
|
||||
await server.Broadcast(new TagPacket {
|
||||
UpdateType = TagPacket.TagUpdate.State,
|
||||
IsIt = true
|
||||
})),
|
||||
}, seeker)),
|
||||
Parallel.ForEachAsync(server.Clients.Except(seekers), async (hider, _) =>
|
||||
await hider.Send(new TagPacket {
|
||||
await server.Broadcast(new TagPacket {
|
||||
UpdateType = TagPacket.TagUpdate.State,
|
||||
IsIt = false
|
||||
})
|
||||
}, hider)
|
||||
)
|
||||
);
|
||||
consoleLogger.Info($"Started game with seekers {string.Join(", ", seekerNames)}");
|
||||
|
|
Loading…
Reference in a new issue