A Disconnect Button

Discussion in 'Mod Discussions' started by keterei, May 25, 2014.

  1. keterei

    keterei Active Member

    Messages:
    258
    Likes Received:
    93
    I'm noticing in this build that after you return to the menu after a game of either multiplayer or galactic war, you are still connected to that previous game through the Uber servers.

    My request is for a disconnect button which is much like the reconnect button mod.
    https://forums.uberent.com/threads/rel-reconnect-button-2-0-0-63475.57733/#post-915404

    This way, myself and others will not have to completely restart the client to get the pop-up that asks if you would like to reconnect or disconnect to/from a previous game because while still connected to another game, you cannot start another.

    If anyone is able to do this I would greatly appreciate it.
  2. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I could call the function that is called from the "Main Menu" button in game. It looks like they are trying to call it from the game over screen, but something isn't working.

    Can you describe an easy way to test whether the previous game is still running, or should I just try something and have you test it?
  3. keterei

    keterei Active Member

    Messages:
    258
    Likes Received:
    93
    After restarting the client after finishing a game, a pop-up menu appears asking if I want to reconnect to the previous game or disconnect from it. This was the tip that let me know I was still connected for some reason. Other than that, there isn't anything I've noticed that shows that you are still connected, like a light or icon, unfortunately. Maybe that could be another project for someone.

    Edit: actually I'm pretty sure your reconnect button mod will have it's button lit up/greyed out if you are still connected to a game, so maybe the same representation could be implemented?

    I think the best thing to do would be to try something and have me test it by trial and error until it works. I'm pretty confident that a way to manually disconnect from a game while in the main menu would be the solution I'm looking for.

    I can reliably test anything we try by starting a game, finishing it, returning to the menu, testing the method, and then trying to start another game. If I can make or join another multiplayer game successfully after using this method in testing, then it works.
  4. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Reconnect Button is querying whether UberNet thinks you are in a game. There are some references to an API call that would remove you from the game, but I've never gotten it to work.

Share This Page