Fixed coopers errors he left
This commit is contained in:
parent
2923a52279
commit
9069c7e79c
2 changed files with 3 additions and 3 deletions
|
|
@ -62,7 +62,7 @@ namespace LightReflectiveMirror
|
||||||
LeaveRoom(clientId);
|
LeaveRoom(clientId);
|
||||||
break;
|
break;
|
||||||
case OpCodes.JoinServer:
|
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;
|
break;
|
||||||
case OpCodes.KickPlayer:
|
case OpCodes.KickPlayer:
|
||||||
LeaveRoom(data.ReadInt(ref pos), clientId);
|
LeaveRoom(data.ReadInt(ref pos), clientId);
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ namespace LightReflectiveMirror
|
||||||
/// <param name="serverId">The server ID of the room</param>
|
/// <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="canDirectConnect">If the client is capable of a direct connection</param>
|
||||||
/// <param name="localIP">The local IP of the client joining</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);
|
LeaveRoom(clientId);
|
||||||
|
|
||||||
|
|
@ -151,7 +151,7 @@ namespace LightReflectiveMirror
|
||||||
byte[] sendBuffer = _sendBuffers.Rent(5);
|
byte[] sendBuffer = _sendBuffers.Rent(5);
|
||||||
|
|
||||||
sendBuffer.WriteByte(ref pos, (byte)OpCodes.RoomCreated);
|
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));
|
Program.transport.ServerSend(clientId, 0, new ArraySegment<byte>(sendBuffer, 0, pos));
|
||||||
_sendBuffers.Return(sendBuffer);
|
_sendBuffers.Return(sendBuffer);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue