• R/O
  • SSH

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

This is a fork of Zandronum Beta for Mac Os (Silicon and Intel)


Commit MetaInfo

修訂850eeed37215b9dfe3baeeb9d083d47c27a67f21 (tree)
時間2022-11-22 00:56:35
作者Adam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

- The server skips sending a SVC2_SETPLAYERSTATUS command to the client that initially sent the CLC_STARTCHAT, CLC_ENTERCONSOLE, CLC_ENTERMENU, etc. command, as they already updated the status on their end.
- Added the helper function PLAYER_SetStatus.

Change Summary

差異

diff -r 2c280cd262f3 -r 850eeed37215 src/botcommands.cpp
--- a/src/botcommands.cpp Sat Oct 29 23:16:47 2022 -0400
+++ b/src/botcommands.cpp Mon Nov 21 10:56:35 2022 -0500
@@ -2056,9 +2056,7 @@
20562056 }
20572057
20582058 // We can now get rid of the chat bubble above the bot's head.
2059- pBot->GetPlayer( )->bChatting = false;
2060- if ( NETWORK_GetState( ) == NETSTATE_SERVER )
2061- SERVERCOMMANDS_SetPlayerStatus( pBot->GetPlayer( ) - players, PLAYERSTATUS_CHATTING );
2059+ PLAYER_SetStatus( pBot->GetPlayer( ), PLAYERSTATUS_CHATTING, false );
20622060 }
20632061
20642062 //*****************************************************************************
@@ -2071,9 +2069,7 @@
20712069 CChatFile *pFile;
20722070
20732071 // We can now get rid of the chat bubble above the bot's head.
2074- pBot->GetPlayer( )->bChatting = false;
2075- if ( NETWORK_GetState( ) == NETSTATE_SERVER )
2076- SERVERCOMMANDS_SetPlayerStatus( pBot->GetPlayer( ) - players, PLAYERSTATUS_CHATTING );
2072+ PLAYER_SetStatus( pBot->GetPlayer( ), PLAYERSTATUS_CHATTING, false );
20772073
20782074 sprintf( szSection, "%s", pBot->m_ScriptData.aszStringStack[pBot->m_ScriptData.lStringStackPosition - 1] );
20792075 pBot->PopStringStack( );
@@ -2129,9 +2125,7 @@
21292125 CChatFile *pFile;
21302126
21312127 // We can now get rid of the chat bubble above the bot's head.
2132- pBot->GetPlayer( )->bChatting = false;
2133- if ( NETWORK_GetState( ) == NETSTATE_SERVER )
2134- SERVERCOMMANDS_SetPlayerStatus( pBot->GetPlayer( ) - players, PLAYERSTATUS_CHATTING );
2128+ PLAYER_SetStatus( pBot->GetPlayer( ), PLAYERSTATUS_CHATTING, false );
21352129
21362130 sprintf( szSection, "%s", pBot->m_ScriptData.aszStringStack[pBot->m_ScriptData.lStringStackPosition - 1] );
21372131 pBot->PopStringStack( );
@@ -2180,18 +2174,14 @@
21802174 //
21812175 static void botcmd_BeginChatting( CSkullBot *pBot )
21822176 {
2183- pBot->GetPlayer( )->bChatting = true;
2184- if ( NETWORK_GetState( ) == NETSTATE_SERVER )
2185- SERVERCOMMANDS_SetPlayerStatus( pBot->GetPlayer( ) - players, PLAYERSTATUS_CHATTING );
2177+ PLAYER_SetStatus( pBot->GetPlayer( ), PLAYERSTATUS_CHATTING, true );
21862178 }
21872179
21882180 //*****************************************************************************
21892181 //
21902182 static void botcmd_StopChatting( CSkullBot *pBot )
21912183 {
2192- pBot->GetPlayer( )->bChatting = false;
2193- if ( NETWORK_GetState( ) == NETSTATE_SERVER )
2194- SERVERCOMMANDS_SetPlayerStatus( pBot->GetPlayer( ) - players, PLAYERSTATUS_CHATTING );
2184+ PLAYER_SetStatus( pBot->GetPlayer( ), PLAYERSTATUS_CHATTING, false );
21952185 }
21962186
21972187 //*****************************************************************************
@@ -2608,9 +2598,7 @@
26082598 CChatFile *pFile;
26092599
26102600 // We can now get rid of the chat bubble above the bot's head.
2611- pBot->GetPlayer( )->bChatting = false;
2612- if ( NETWORK_GetState( ) == NETSTATE_SERVER )
2613- SERVERCOMMANDS_SetPlayerStatus( pBot->GetPlayer( ) - players, PLAYERSTATUS_CHATTING );
2601+ PLAYER_SetStatus( pBot->GetPlayer( ), PLAYERSTATUS_CHATTING, false );
26142602
26152603 sprintf( szSection, "%s", pBot->m_ScriptData.aszStringStack[pBot->m_ScriptData.lStringStackPosition - 1] );
26162604 pBot->PopStringStack( );
@@ -2666,9 +2654,7 @@
26662654 CChatFile *pFile;
26672655
26682656 // We can now get rid of the chat bubble above the bot's head.
2669- pBot->GetPlayer( )->bChatting = false;
2670- if ( NETWORK_GetState( ) == NETSTATE_SERVER )
2671- SERVERCOMMANDS_SetPlayerStatus( pBot->GetPlayer( ) - players, PLAYERSTATUS_CHATTING );
2657+ PLAYER_SetStatus( pBot->GetPlayer( ), PLAYERSTATUS_CHATTING, false );
26722658
26732659 sprintf( szSection, "%s", pBot->m_ScriptData.aszStringStack[pBot->m_ScriptData.lStringStackPosition - 1] );
26742660 pBot->PopStringStack( );
diff -r 2c280cd262f3 -r 850eeed37215 src/c_console.cpp
--- a/src/c_console.cpp Sat Oct 29 23:16:47 2022 -0400
+++ b/src/c_console.cpp Mon Nov 21 10:56:35 2022 -0500
@@ -1693,27 +1693,14 @@
16931693 TabbedLast = false;
16941694 TabbedList = false;
16951695
1696- // [BB] Don't change the displayed console status when a demo is played.
1697- if ( CLIENTDEMO_IsPlaying( ) == false )
1698- players[consoleplayer].bInConsole = true;
1699-
1700- // [RC] Tell the server so we get an "in console" icon.
1701- if ( NETWORK_GetState( ) == NETSTATE_CLIENT )
1702- CLIENTCOMMANDS_EnterConsole( );
1696+ PLAYER_SetStatus( &players[consoleplayer], PLAYERSTATUS_INCONSOLE, true, PLAYERSTATUS_CLIENTSHOULDSENDUPDATE );
17031697 }
17041698 else if (gamestate != GS_FULLCONSOLE && gamestate != GS_STARTUP)
17051699 {
17061700 ConsoleState = c_rising;
17071701 C_FlushDisplay ();
17081702
1709- // [BB] Don't change the displayed console status when a demo is played.
1710- if ( CLIENTDEMO_IsPlaying( ) == false )
1711- players[consoleplayer].bInConsole = false;
1712-
1713- // [RC] Tell the server so our "in console" icon is removed.
1714- if ( NETWORK_GetState( ) == NETSTATE_CLIENT )
1715- CLIENTCOMMANDS_ExitConsole( );
1716-
1703+ PLAYER_SetStatus( &players[consoleplayer], PLAYERSTATUS_INCONSOLE, false, PLAYERSTATUS_CLIENTSHOULDSENDUPDATE );
17171704 }
17181705 }
17191706
@@ -1733,13 +1720,7 @@
17331720 // [BB] We are not in console anymore, so set bInConsole if necessary.
17341721 if ( players[consoleplayer].bInConsole )
17351722 {
1736- // [BB] Don't change the displayed console status when a demo is played.
1737- if ( CLIENTDEMO_IsPlaying( ) == false )
1738- players[consoleplayer].bInConsole = false;
1739-
1740- // [RC] Tell the server so our "in console" icon is removed.
1741- if ( NETWORK_GetState( ) == NETSTATE_CLIENT )
1742- CLIENTCOMMANDS_ExitConsole( );
1723+ PLAYER_SetStatus( &players[consoleplayer], PLAYERSTATUS_INCONSOLE, false, PLAYERSTATUS_CLIENTSHOULDSENDUPDATE );
17431724 }
17441725 }
17451726 }
diff -r 2c280cd262f3 -r 850eeed37215 src/chat.cpp
--- a/src/chat.cpp Sat Oct 29 23:16:47 2022 -0400
+++ b/src/chat.cpp Mon Nov 21 10:56:35 2022 -0500
@@ -845,22 +845,14 @@
845845
846846 if ( ulMode != CHATMODE_NONE )
847847 {
848- pPlayer->bChatting = true;
849-
850- // Tell the server we're beginning to chat.
851- if ( NETWORK_GetState( ) == NETSTATE_CLIENT )
852- CLIENTCOMMANDS_StartChat( );
848+ PLAYER_SetStatus( pPlayer, PLAYERSTATUS_CHATTING, true, PLAYERSTATUS_CLIENTSHOULDSENDUPDATE );
853849
854850 // [AK] Ensure that the cursor starts off as white.
855851 g_ulChatTicker = 0;
856852 }
857853 else
858854 {
859- pPlayer->bChatting = false;
860-
861- // Tell the server we're done chatting.
862- if ( NETWORK_GetState( ) == NETSTATE_CLIENT )
863- CLIENTCOMMANDS_EndChat( );
855+ PLAYER_SetStatus( pPlayer, PLAYERSTATUS_CHATTING, false, PLAYERSTATUS_CLIENTSHOULDSENDUPDATE );
864856 }
865857
866858 }
diff -r 2c280cd262f3 -r 850eeed37215 src/cl_main.cpp
--- a/src/cl_main.cpp Sat Oct 29 23:16:47 2022 -0400
+++ b/src/cl_main.cpp Mon Nov 21 10:56:35 2022 -0500
@@ -4190,28 +4190,7 @@
41904190 //
41914191 void ServerCommands::SetPlayerStatus::Execute()
41924192 {
4193- switch ( type )
4194- {
4195- case PLAYERSTATUS_CHATTING:
4196- player->bChatting = value;
4197- break;
4198-
4199- case PLAYERSTATUS_INCONSOLE:
4200- player->bInConsole = value;
4201- break;
4202-
4203- case PLAYERSTATUS_INMENU:
4204- player->bInMenu = value;
4205- break;
4206-
4207- case PLAYERSTATUS_LAGGING:
4208- player->bLagging = value;
4209- break;
4210-
4211- case PLAYERSTATUS_READYTOGOON:
4212- player->bReadyToGoOn = value;
4213- break;
4214- }
4193+ PLAYER_SetStatus( player, type, value );
42154194 }
42164195
42174196 //*****************************************************************************
diff -r 2c280cd262f3 -r 850eeed37215 src/d_player.h
--- a/src/d_player.h Sat Oct 29 23:16:47 2022 -0400
+++ b/src/d_player.h Mon Nov 21 10:56:35 2022 -0500
@@ -798,6 +798,7 @@
798798 void PLAYER_SetWins( player_t *pPlayer, ULONG ulWins );
799799 void PLAYER_SetKills( player_t *pPlayer, ULONG ulKills );
800800 void PLAYER_SetDeaths( player_t *pPlayer, ULONG ulDeaths, bool bInformClients = true );
801+void PLAYER_SetStatus( player_t *pPlayer, ULONG ulType, bool bEnable, ULONG ulFlags = 0 );
801802 // [BB] PLAYER_GetHealth and PLAYER_GetLivesLeft are helper functions for PLAYER_GetPlayerWithSingleHighestValue.
802803 LONG PLAYER_GetHealth( ULONG ulPlayer );
803804 LONG PLAYER_GetLivesLeft( ULONG ulPlayer );
diff -r 2c280cd262f3 -r 850eeed37215 src/menu/menu.cpp
--- a/src/menu/menu.cpp Sat Oct 29 23:16:47 2022 -0400
+++ b/src/menu/menu.cpp Mon Nov 21 10:56:35 2022 -0500
@@ -341,13 +341,7 @@
341341 BackbuttonTime = 0;
342342 BackbuttonAlpha = 0;
343343
344- // [BB] Don't change the displayed menu status when a demo is played.
345- if ( CLIENTDEMO_IsPlaying() == false )
346- players[consoleplayer].bInMenu = true;
347-
348- // [RC] Tell the server so we get an "in menu" icon.
349- if ( NETWORK_GetState() == NETSTATE_CLIENT )
350- CLIENTCOMMANDS_EnterMenu();
344+ PLAYER_SetStatus( &players[consoleplayer], PLAYERSTATUS_INMENU, true, PLAYERSTATUS_CLIENTSHOULDSENDUPDATE );
351345 }
352346
353347 //=============================================================================
@@ -870,17 +864,7 @@
870864 ServerSetupMenu = NULL;
871865 ServerMenuEnabled = false;
872866
873- // [BB] We are not in menu anymore, so set bInMenu if necessary.
874- if ( players[consoleplayer].bInMenu )
875- {
876- // [BB] Don't change the displayed menu status when a demo is played.
877- if ( CLIENTDEMO_IsPlaying() == false )
878- players[consoleplayer].bInMenu = false;
879-
880- // [RC] Tell the server so our "in Menu" icon is removed.
881- if ( NETWORK_GetState() == NETSTATE_CLIENT )
882- CLIENTCOMMANDS_ExitMenu();
883- }
867+ PLAYER_SetStatus( &players[consoleplayer], PLAYERSTATUS_INMENU, false, PLAYERSTATUS_CLIENTSHOULDSENDUPDATE );
884868 }
885869
886870 //=============================================================================
diff -r 2c280cd262f3 -r 850eeed37215 src/network.h
--- a/src/network.h Sat Oct 29 23:16:47 2022 -0400
+++ b/src/network.h Mon Nov 21 10:56:35 2022 -0500
@@ -230,6 +230,12 @@
230230 PLAYERSTATUS_READYTOGOON,
231231 };
232232
233+enum PlayerStatusFlag
234+{
235+ PLAYERSTATUS_CLIENTSHOULDSENDUPDATE = 1 << 0,
236+ PLAYERSTATUS_SERVERSHOULDSKIPCLIENT = 1 << 1,
237+};
238+
233239 // [AK] If we're updating the map rotation then what exactly are we doing?
234240 enum UpdateMapRotationType
235241 {
diff -r 2c280cd262f3 -r 850eeed37215 src/p_interaction.cpp
--- a/src/p_interaction.cpp Sat Oct 29 23:16:47 2022 -0400
+++ b/src/p_interaction.cpp Mon Nov 21 10:56:35 2022 -0500
@@ -2821,6 +2821,114 @@
28212821
28222822 //*****************************************************************************
28232823 //
2824+void PLAYER_SetStatus( player_t *pPlayer, ULONG ulType, bool bEnable, ULONG ulFlags )
2825+{
2826+ if ( pPlayer == NULL )
2827+ return;
2828+
2829+ switch ( ulType )
2830+ {
2831+ case PLAYERSTATUS_CHATTING:
2832+ {
2833+ if ( pPlayer->bChatting == bEnable )
2834+ return;
2835+
2836+ pPlayer->bChatting = bEnable;
2837+
2838+ // [AK] Tell the server we're beginning to or have stopped chatting.
2839+ if (( NETWORK_GetState( ) == NETSTATE_CLIENT ) && ( ulFlags & PLAYERSTATUS_CLIENTSHOULDSENDUPDATE ))
2840+ {
2841+ if ( bEnable )
2842+ CLIENTCOMMANDS_StartChat( );
2843+ else
2844+ CLIENTCOMMANDS_EndChat( );
2845+ }
2846+
2847+ break;
2848+ }
2849+
2850+ case PLAYERSTATUS_INCONSOLE:
2851+ {
2852+ // [BB] Don't change the displayed console status when a demo is played.
2853+ if (( CLIENTDEMO_IsPlaying( )) || ( pPlayer->bInConsole == bEnable ))
2854+ return;
2855+
2856+ pPlayer->bInConsole = bEnable;
2857+
2858+ // [AK] Tell the server that we entered or exited the console.
2859+ if (( NETWORK_GetState( ) == NETSTATE_CLIENT ) && ( ulFlags & PLAYERSTATUS_CLIENTSHOULDSENDUPDATE ))
2860+ {
2861+ if ( bEnable )
2862+ CLIENTCOMMANDS_EnterConsole( );
2863+ else
2864+ CLIENTCOMMANDS_ExitConsole( );
2865+ }
2866+
2867+ break;
2868+ }
2869+
2870+ case PLAYERSTATUS_INMENU:
2871+ {
2872+ // [BB] Don't change the displayed menu status when a demo is played.
2873+ if (( CLIENTDEMO_IsPlaying( )) || ( pPlayer->bInMenu == bEnable ))
2874+ return;
2875+
2876+ pPlayer->bInMenu = bEnable;
2877+
2878+ // [AK] Tell the server that we entered or exited the menu.
2879+ if (( NETWORK_GetState( ) == NETSTATE_CLIENT ) && ( ulFlags & PLAYERSTATUS_CLIENTSHOULDSENDUPDATE ))
2880+ {
2881+ if ( bEnable )
2882+ CLIENTCOMMANDS_EnterMenu( );
2883+ else
2884+ CLIENTCOMMANDS_ExitMenu( );
2885+ }
2886+
2887+ break;
2888+ }
2889+
2890+ case PLAYERSTATUS_LAGGING:
2891+ {
2892+ if ( pPlayer->bLagging == bEnable )
2893+ return;
2894+
2895+ pPlayer->bLagging = bEnable;
2896+ break;
2897+ }
2898+
2899+ case PLAYERSTATUS_READYTOGOON:
2900+ {
2901+ if ( pPlayer->bReadyToGoOn == bEnable )
2902+ return;
2903+
2904+ pPlayer->bReadyToGoOn = bEnable;
2905+ break;
2906+ }
2907+
2908+ default:
2909+ return;
2910+ }
2911+
2912+ // [AK] If we're the server, tell the clients that this player's status changed,
2913+ // except when we update this player's "ready to go on" status if everyone's ready.
2914+ if ( NETWORK_GetState( ) == NETSTATE_SERVER )
2915+ {
2916+ if (( ulType != PLAYERSTATUS_READYTOGOON ) || ( SERVER_IsEveryoneReadyToGoOn( ) == false ))
2917+ {
2918+ const ULONG ulPlayer = pPlayer - players;
2919+
2920+ // [AK] Should we skip sending an update to the client whose status we're changing?
2921+ // This is if the client already changed the status on their end.
2922+ if ( ulFlags & PLAYERSTATUS_SERVERSHOULDSKIPCLIENT )
2923+ SERVERCOMMANDS_SetPlayerStatus( ulPlayer, static_cast<PlayerStatusType>( ulType ), ulPlayer, SVCF_SKIPTHISCLIENT );
2924+ else
2925+ SERVERCOMMANDS_SetPlayerStatus( ulPlayer, static_cast<PlayerStatusType>( ulType ));
2926+ }
2927+ }
2928+}
2929+
2930+//*****************************************************************************
2931+//
28242932 LONG PLAYER_GetHealth( ULONG ulPlayer )
28252933 {
28262934 return players[ulPlayer].health;
diff -r 2c280cd262f3 -r 850eeed37215 src/sv_main.cpp
--- a/src/sv_main.cpp Sat Oct 29 23:16:47 2022 -0400
+++ b/src/sv_main.cpp Mon Nov 21 10:56:35 2022 -0500
@@ -1082,19 +1082,13 @@
10821082 // Have not heard from the client in at least one second; mark him as
10831083 // lagging and tell clients.
10841084 if ( players[ulIdx].bLagging == false )
1085- {
1086- players[ulIdx].bLagging = true;
1087- SERVERCOMMANDS_SetPlayerStatus( ulIdx, PLAYERSTATUS_LAGGING );
1088- }
1085+ PLAYER_SetStatus( &players[ulIdx], PLAYERSTATUS_LAGGING, true );
10891086 }
10901087 else
10911088 {
10921089 // Player is no longer lagging. Tell clients.
10931090 if ( players[ulIdx].bLagging )
1094- {
1095- players[ulIdx].bLagging = false;
1096- SERVERCOMMANDS_SetPlayerStatus( ulIdx, PLAYERSTATUS_LAGGING );
1097- }
1091+ PLAYER_SetStatus( &players[ulIdx], PLAYERSTATUS_LAGGING, false );
10981092 }
10991093 }
11001094 }
@@ -4767,48 +4761,25 @@
47674761 if ( server_CheckForClientMinorCommandFlood ( g_lCurrentClient ) == true )
47684762 return ( true );
47694763
4764+ // Client is beginning to type.
47704765 if ( lCommand == CLC_STARTCHAT )
4771- {
4772- // Client is beginning to type.
4773- players[g_lCurrentClient].bChatting = true;
4774-
4775- // Tell clients about the change in this player's chatting status.
4776- SERVERCOMMANDS_SetPlayerStatus( g_lCurrentClient, PLAYERSTATUS_CHATTING );
4777- }
4766+ PLAYER_SetStatus( &players[g_lCurrentClient], PLAYERSTATUS_CHATTING, true, PLAYERSTATUS_SERVERSHOULDSKIPCLIENT );
4767+ // Client is done talking.
47784768 else if ( lCommand == CLC_ENDCHAT )
4779- {
4780- // Client is done talking.
4781- players[g_lCurrentClient].bChatting = false;
4782-
4783- // Tell clients about the change in this player's chatting status.
4784- SERVERCOMMANDS_SetPlayerStatus( g_lCurrentClient, PLAYERSTATUS_CHATTING );
4785- }
4769+ PLAYER_SetStatus( &players[g_lCurrentClient], PLAYERSTATUS_CHATTING, false, PLAYERSTATUS_SERVERSHOULDSKIPCLIENT );
4770+ // Player has entered the console - give him an icon.
47864771 else if ( lCommand == CLC_ENTERCONSOLE )
4787- {
4788-
4789- // Player has entered the console - give him an icon.
4790- players[g_lCurrentClient].bInConsole = true;
4791- SERVERCOMMANDS_SetPlayerStatus( g_lCurrentClient, PLAYERSTATUS_INCONSOLE );
4792- }
4772+ PLAYER_SetStatus( &players[g_lCurrentClient], PLAYERSTATUS_INCONSOLE, true, PLAYERSTATUS_SERVERSHOULDSKIPCLIENT );
4773+ // Player has left the console - remove his icon.
47934774 else if ( lCommand == CLC_EXITCONSOLE )
4794- {
4795- // Player has left the console - remove his icon.
4796- players[g_lCurrentClient].bInConsole = false;
4797- SERVERCOMMANDS_SetPlayerStatus( g_lCurrentClient, PLAYERSTATUS_INCONSOLE );
4798- }
4775+ PLAYER_SetStatus( &players[g_lCurrentClient], PLAYERSTATUS_INCONSOLE, false, PLAYERSTATUS_SERVERSHOULDSKIPCLIENT );
4776+ // Player has entered the menu - give him an icon.
47994777 else if ( lCommand == CLC_ENTERMENU )
4800- {
4801-
4802- // Player has entered the console - give him an icon.
4803- players[g_lCurrentClient].bInMenu = true;
4804- SERVERCOMMANDS_SetPlayerStatus( g_lCurrentClient, PLAYERSTATUS_INMENU );
4805- }
4778+ PLAYER_SetStatus( &players[g_lCurrentClient], PLAYERSTATUS_INMENU, true, PLAYERSTATUS_SERVERSHOULDSKIPCLIENT );
4779+ // Player has left the menu - remove his icon.
48064780 else if ( lCommand == CLC_EXITMENU )
4807- {
4808- // Player has left the console - remove his icon.
4809- players[g_lCurrentClient].bInMenu = false;
4810- SERVERCOMMANDS_SetPlayerStatus( g_lCurrentClient, PLAYERSTATUS_INMENU );
4811- }
4781+ PLAYER_SetStatus( &players[g_lCurrentClient], PLAYERSTATUS_INMENU, false, PLAYERSTATUS_SERVERSHOULDSKIPCLIENT );
4782+
48124783 return false;
48134784 case CLC_IGNORE:
48144785
@@ -4901,10 +4872,7 @@
49014872
49024873 // Toggle this player (specator)'s "ready to go on" status.
49034874 // [RC] Now a permanent choice.
4904- players[g_lCurrentClient].bReadyToGoOn = true;
4905-
4906- if ( SERVER_IsEveryoneReadyToGoOn( ) == false )
4907- SERVERCOMMANDS_SetPlayerStatus( g_lCurrentClient, PLAYERSTATUS_READYTOGOON );
4875+ PLAYER_SetStatus( &players[g_lCurrentClient], PLAYERSTATUS_READYTOGOON, true );
49084876
49094877 return false;
49104878 case CLC_CHANGEDISPLAYPLAYER:
@@ -6070,23 +6038,15 @@
60706038 {
60716039 // [K6/BB] The client is pressing a button, so not afk.
60726040 g_aClients[ulClient].lLastActionTic = gametic;
6041+
60736042 if ( pPlayer->bChatting )
6074- {
6075- pPlayer->bChatting = false;
6076- SERVERCOMMANDS_SetPlayerStatus( ulClient, PLAYERSTATUS_CHATTING );
6077- }
6043+ PLAYER_SetStatus( &players[ulClient], PLAYERSTATUS_CHATTING, false );
60786044
60796045 if ( pPlayer->bInConsole )
6080- {
6081- pPlayer->bInConsole = false;
6082- SERVERCOMMANDS_SetPlayerStatus( ulClient, PLAYERSTATUS_INCONSOLE );
6083- }
6046+ PLAYER_SetStatus( &players[ulClient], PLAYERSTATUS_INCONSOLE, false );
60846047
60856048 if ( pPlayer->bInMenu )
6086- {
6087- pPlayer->bInMenu = false;
6088- SERVERCOMMANDS_SetPlayerStatus( ulClient, PLAYERSTATUS_INMENU );
6089- }
6049+ PLAYER_SetStatus( &players[ulClient], PLAYERSTATUS_INMENU, false );
60906050 }
60916051
60926052 return ( false );