Fixed coopers errors he left

This commit is contained in:
Derek S 2021-04-06 20:30:21 -05:00
parent 2923a52279
commit 9069c7e79c
2 changed files with 3 additions and 3 deletions

View file

@ -62,7 +62,7 @@ namespace LightReflectiveMirror
LeaveRoom(clientId);
break;
case OpCodes.JoinServer:
JoinRoom(clientId, data.ReadInt(ref pos), data.ReadBool(ref pos), data.ReadString(ref pos));
JoinRoom(clientId, data.ReadString(ref pos), data.ReadBool(ref pos), data.ReadString(ref pos));
break;
case OpCodes.KickPlayer:
LeaveRoom(data.ReadInt(ref pos), clientId);

View file

@ -33,7 +33,7 @@ namespace LightReflectiveMirror
/// <param name="serverId">The server ID of the room</param>
/// <param name="canDirectConnect">If the client is capable of a direct connection</param>
/// <param name="localIP">The local IP of the client joining</param>
void JoinRoom(int clientId, int serverId, bool canDirectConnect, string localIP)
void JoinRoom(int clientId, string serverId, bool canDirectConnect, string localIP)
{
LeaveRoom(clientId);
@ -151,7 +151,7 @@ namespace LightReflectiveMirror
byte[] sendBuffer = _sendBuffers.Rent(5);
sendBuffer.WriteByte(ref pos, (byte)OpCodes.RoomCreated);
sendBuffer.WriteInt(ref pos, clientId);
sendBuffer.WriteString(ref pos, room.serverId);
Program.transport.ServerSend(clientId, 0, new ArraySegment<byte>(sendBuffer, 0, pos));
_sendBuffers.Return(sendBuffer);