[SOLVED] Duplicating Players After Multiple Logins

After each login to my server, each client instantiates an extra prefab for itself, and causes each previous client to spawn an extra one, ad infinitum.

My guess is that this has something to do with buffered RPC calls - each new client calls its own Network.Instantiate, and also receives each previous Network.Instantiate. I don’t understand how this causes previous clients to receive new instantiations that they can then control (each window in the image above controls four clients simultaneously). This accrual of prefabs occurs even if previous clients have logged out before new ones appear.

I don’t understand why this should be the case, because in the server I do:

void OnPlayerDisconnected(NetworkPlayer networkPlayer){
        Network.RemoveRPCs(networkPlayer);
        Network.DestroyPlayerObjects(networkPlayer);
    }

… And for good measure I’ve started having the client do:

    void Update(){
        if (Input.GetKeyDown(KeyCode.Escape) && connected){
            Network.RemoveRPCs(localPlayer.networkView.viewID);
            Network.Disconnect();
            Application.Quit();
        }   
    }

What have I missed?

The full networkManager code is here and the code that spawns players upon entering Level 1 is here

Solved: The problem was here:

void OnPlayerConnected(NetworkPlayer player){
        print ("Playe connected. Sending seed: "+seed.ToString());
        networkView.RPC("GetSeed",RPCMode.OthersBuffered,new object[]{seed});
    }

Because of “OthersBuffered”, existing players were getting this RPC and re-running their spawn player scripts. I’ve since altered this to target the specific player connecting.