fix for the fix
This commit is contained in:
parent
6bb6511188
commit
7e7ab81a9b
3 changed files with 17 additions and 2 deletions
|
|
@ -145,6 +145,7 @@ namespace LightReflectiveMirror
|
|||
{
|
||||
for (int i = 0; i < rooms.Count; i++)
|
||||
{
|
||||
// if host left
|
||||
if (rooms[i].hostId == clientId)
|
||||
{
|
||||
int pos = 0;
|
||||
|
|
@ -167,6 +168,7 @@ namespace LightReflectiveMirror
|
|||
}
|
||||
else
|
||||
{
|
||||
// if the person that tried to kick wasnt host and it wasnt the client leaving on their own
|
||||
if (requiredHostId != -1 && rooms[i].hostId != requiredHostId)
|
||||
continue;
|
||||
|
||||
|
|
@ -180,6 +182,19 @@ namespace LightReflectiveMirror
|
|||
|
||||
Program.transport.ServerSend(rooms[i].hostId, 0, new ArraySegment<byte>(sendBuffer, 0, pos));
|
||||
_sendBuffers.Return(sendBuffer);
|
||||
|
||||
// temporary solution to kicking bug
|
||||
// this tells the local player that got kicked that he, well, got kicked.
|
||||
pos = 0;
|
||||
sendBuffer = _sendBuffers.Rent(1);
|
||||
|
||||
sendBuffer.WriteByte(ref pos, (byte)OpCodes.ServerLeft);
|
||||
|
||||
Program.transport.ServerSend(clientId, 0, new ArraySegment<byte>(sendBuffer, 0, pos));
|
||||
_sendBuffers.Return(sendBuffer);
|
||||
|
||||
//end temporary solution
|
||||
|
||||
Endpoint.RoomsModified();
|
||||
_cachedClientRooms.Remove(clientId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ namespace LightReflectiveMirror
|
|||
break;
|
||||
|
||||
case OpCodes.ServerLeft:
|
||||
// Called when we were kicked, or server was closed.
|
||||
// Called when server was closed.
|
||||
if (_isClient)
|
||||
{
|
||||
_isClient = false;
|
||||
|
|
|
|||
|
|
@ -517,7 +517,7 @@ PlayerSettings:
|
|||
13: MIRROR;MIRROR_17_0_OR_NEWER;MIRROR_18_0_OR_NEWER;MIRROR_24_0_OR_NEWER;MIRROR_26_0_OR_NEWER;MIRROR_27_0_OR_NEWER;MIRROR_28_0_OR_NEWER;MIRROR_29_0_OR_NEWER;MIRROR_30_0_OR_NEWER;MIRROR_30_5_2_OR_NEWER;MIRROR_32_1_2_OR_NEWER;MIRROR_32_1_4_OR_NEWER;MIRROR_35_0_OR_NEWER;MIRROR_35_1_OR_NEWER
|
||||
platformArchitecture: {}
|
||||
scriptingBackend:
|
||||
Standalone: 1
|
||||
Standalone: 0
|
||||
il2cppCompilerConfiguration: {}
|
||||
managedStrippingLevel: {}
|
||||
incrementalIl2cppBuild: {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue