Hey all. Working with some simple networking code and can't find how to disconnect the player when I close the client side program. When I run the server side and client side, if I stop or close the client program it never sends the disconnect signal to the server. So any code on that player still runs, but can't send it anywhere. On the server side I need to remove the player when they disconnect.
How do I run the disconnect code on the client side when I close the program?
How can I check to make sure a player is connected before trying to do anything with it?
Edit: I found the answer! Turns out I hadn't linked the "peer_disconnected" signal to anything. It was just sitting there doing nothing so once I hooked it up, I can work with a disconnected player!