# HG changeset patch # User Adam Kaminski # Date 1644161904 18000 # Sun Feb 06 10:38:24 2022 -0500 # Node ID 45c98957c0eb2132ba08dbca7c98f04387e5ae1d # Parent c7e616baee77c645b50ca34c2aa47b1a95577568 The "SpawnPlayer" server command doesn't send the player's current state anymore, and their prior state is now sent as a short byte to reduce bandwidth slightly. diff -r c7e616baee77 -r 45c98957c0eb protocolspec/spec.players.txt --- a/protocolspec/spec.players.txt Thu Feb 03 20:14:02 2022 -0500 +++ b/protocolspec/spec.players.txt Sun Feb 06 10:38:24 2022 -0500 @@ -1,8 +1,7 @@ Command SpawnPlayer Player player with IndexTestOnly - Byte priorState - # Do we really need to send this? Shouldn't it always be PST_LIVE? - Byte playerState + # [AK] Send the prior state as a short byte so that the four bools can fit together into a single byte. + ShortByte<4> priorState Bool isBot Bool isSpectating Bool isDeadSpectator diff -r c7e616baee77 -r 45c98957c0eb src/cl_main.cpp --- a/src/cl_main.cpp Thu Feb 03 20:14:02 2022 -0500 +++ b/src/cl_main.cpp Sun Feb 06 10:38:24 2022 -0500 @@ -3516,7 +3516,6 @@ pPlayer->mo = pActor; pActor->player = pPlayer; - pPlayer->playerstate = playerState; // If we were watching through this player's eyes, reattach the camera. if ( bWasWatchingPlayer ) @@ -3696,8 +3695,6 @@ pActor->z + TELEFOGHEIGHT, ALLOW_REPLACE ); } - pPlayer->playerstate = PST_LIVE; - // [BB] If the player is reborn, we have to substitute all pointers // to the old body to the new one. Otherwise (among other things) CLIENTSIDE // ENTER scripts stop working after the corresponding player is respawned. diff -r c7e616baee77 -r 45c98957c0eb src/sv_commands.cpp --- a/src/sv_commands.cpp Thu Feb 03 20:14:02 2022 -0500 +++ b/src/sv_commands.cpp Sun Feb 06 10:38:24 2022 -0500 @@ -263,8 +263,6 @@ command.SetPlayer( &players[ulPlayer] ); command.SetPriorState( lPlayerState ); command.SetIsBot( players[ulPlayer].bIsBot ); - // Do we really need to send this? Shouldn't it always be PST_LIVE? - command.SetPlayerState( players[ulPlayer].playerstate ); command.SetIsSpectating( players[ulPlayer].bSpectating ); command.SetIsDeadSpectator( players[ulPlayer].bDeadSpectator ); command.SetIsMorphed( bMorph );