def destroy(self, networker, game, state): player = state.players[self.id] player.destroy(game, state) event = networking.event_serialize.ServerEventDisconnect(self.id) networker.sendbuffer.append(event) self.events = [] del networker.players[self.address]
def Server_Event_Disconnect(client, networker, game, event): player = game.current_state.players[event.playerid] print (player.name +" has disconnected") player.destroy(game, game.current_state)
def Server_Event_Disconnect(client, networker, game, state, event): player = state.players[event.playerid] print (player.name +" has disconnected") player.destroy(game, state)