Hi everyone. I’m developing a simple online third person shooter. It works but I have a problem when client disconnect from server.
I use a peer to peer approach, so one player is the server, other players connect as client and I use RPC calls for syncronization.
The problem is for projectile, when a client player disconnect and reconnect to the server he will be re-hit from the projectile that have hit him before disconnecting from the server. How can I solve my problem?
I think this is the problem (RPC buffer), but the server should clear RPCbuffered when a client disconnect:
function OnPlayerDisconnected (player : NetworkPlayer)
{
Debug.Log("Server destroying player");
Network.RemoveRPCs(player, 0);
Network.DestroyPlayerObjects(player);
}
but it doesn’t work