Let clients rejoin the server without losing their status
- Jan 24, 2020
-
-
LJ Sonic authored
This lets the host manually remove a body if they want, without polluting the chat with redundant messages.
8bd897a2
-
- Jan 23, 2020
- Jan 22, 2020
-
-
LJ Sonic authoredcfec8609
-
https://git.magicalgirl.moe/STJr/SRB2.gitLJ Sonic authored
# Conflicts: # src/g_game.c # src/p_setup.c
f209721d -
LJ Sonic authored2527b6c3
-
LJ Sonic authored412ba38a
-
LJ Sonic authoredd03c928b
-
LJ Sonic authored73d0549f
-
LJ Sonic authored
This is accomplished by simply preserving the player's body after disconnecting. Bodies will despawn after the number of minutes specified by the "rejointimeout" console variable (float). A value of 0 disables the feature completely. Clients rejoining are identified by their IP address, and may rejoin even if the server is full or joins are disabled, for as long as their body remains. From a technical standpoint, when the user disconnects, the player they were controlling does not leave, the underlying player_t just keeps working normally, except it does not receive any input anymore. When the user reconnects, they are simply "relinked" to their player_t. Those "soulless" players can be identified through their "quittime" field, which is the number of tics elapsed since the user disconnected, or zero if still connected. "quittime" is exposed to Lua.
d374bf4f
-