Skip to content
This repository has been archived by the owner on Sep 5, 2022. It is now read-only.

Commit

Permalink
Fix not being able to kick players
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxpxr committed Jul 29, 2021
1 parent 68ad9ef commit 10f4790
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions UnityProject/Assets/Mirror/Examples/Tanks/Scripts/Tank.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using UnityEngine;
using UnityEngine.AI;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ public override bool ServerDisconnect(int connectionId)
int pos = 0;
_clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.KickPlayer);
_clientSendBuffer.WriteInt(ref pos, relayId);
clientToServerTransport.ClientSend(0, new ArraySegment<byte>(_clientSendBuffer, 0, pos));
return true;
}

Expand All @@ -178,6 +179,7 @@ public override void ServerDisconnect(int connectionId)
int pos = 0;
_clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.KickPlayer);
_clientSendBuffer.WriteInt(ref pos, relayId);
clientToServerTransport.ClientSend(new ArraySegment<byte>(_clientSendBuffer, 0, pos), 0);
return;
}

Expand Down

0 comments on commit 10f4790

Please sign in to comment.