private void FourPlayerServer_OnClientDisconnected(ClientSession client) { lock (this._locker) { FourPlayerSession session = client as FourPlayerSession; if (session.Position != 0) { this.SetPosition(session.Position, ""); } } }
public void OnSetPosition(int sessionID, byte position, string player) { lock (this._locker) { if (this._positions[position] == "") { FourPlayerSession client = base.GetClient(sessionID) as FourPlayerSession; if (client.Position != 0) { this.SetPosition(client.Position, ""); } this.SetPosition(position, player); client.Position = position; base.Send(sessionID, FourPlayerServerHelper.SetPositionSuccess(position)); } } }