Skip to content
This repository was archived by the owner on Sep 15, 2024. It is now read-only.

Commit e24e0da

Browse files
stop using old method
1 parent bc16a9c commit e24e0da

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

Scripts/Netcode/Common/CPacketLobby.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ private void HandleJoin(Peer peer)
230230
}, peer);
231231

232232
// tell other players about new player that joined
233-
Server.SendToOtherPeers(peer.ID, ServerPacketOpcode.Lobby, new SPacketLobby
233+
Server.SendToOtherPlayers(peer.ID, ServerPacketOpcode.Lobby, new SPacketLobby
234234
{
235235
LobbyOpcode = LobbyOpcode.LobbyJoin,
236236
Id = (byte)peer.ID,

Scripts/Netcode/Common/SPacketLobby.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,7 @@ private void HandleLeave()
248248
SceneManager.GetActiveSceneScript<SceneLobby>().RemovePlayer(Id);
249249

250250
if (SceneManager.InGame())
251-
{
252251
SceneManager.GetActiveSceneScript<SceneGame>().RemovePlayer(Id);
253-
}
254252

255253
Client.Players.Remove(Id);
256254
Client.Log($"Player with id: {Id} left the lobby");

Scripts/Netcode/Server/GameServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private void HandlePlayerLeave(uint id)
137137
{
138138
LobbyOpcode = LobbyOpcode.LobbyLeave,
139139
Id = (byte)id
140-
}, GetOtherPeers(id));
140+
}, GetOtherPlayerPeers(id));
141141

142142
Players.Remove((byte)id);
143143
}

0 commit comments

Comments
 (0)