• R/O
  • SSH

Commit

Tags
No Tags

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 used on servers hosted by The Sentinels Playground (TSPG), Euroboros (EB), and Down Under Doomers (DUD).


Commit MetaInfo

Revisiona195a1e2923953556e8c7ca2827f769549e0a3a3 (tree)
Time2024-04-12 04:00:18
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Added a new flag to lmsspectatorsettings: "lms_spectatorvoicechat", to decide if spectators can talk with live players while a game's in progress.

Change Summary

Incremental Difference

diff -r ad7d035b4fb4 -r a195a1e29239 docs/zandronum-history.txt
--- a/docs/zandronum-history.txt Thu Apr 11 14:55:09 2024 -0400
+++ b/docs/zandronum-history.txt Thu Apr 11 15:00:18 2024 -0400
@@ -60,6 +60,7 @@
6060 + - Added the CVars "cl_motionswayspeed" and "cl_jumpswayspeed" (and MotionSwaySpeed and JumpSwaySpeed DECORATE weapon properties), to add additional sway to a player's weapon when they move, crouch, or jump up or down. [Kaminsky]
6161 + - Added the CVars "cl_stillbobspeed" and "cl_stillbobrange" (and StillBobSpeed and StillBobRange DECORATE weapon properties), to also bob the weapon up and down while the player stands still. [Kaminsky]
6262 + - Added the CVar "cl_spectatorsource", which enables source-engine like noclipping that allows spectators to pass through floors and ceilings. Based on the "zcc_spectsource" feature from ZCC. [Kaminsky]
63++ - Added a new flag to lmsspectatorsettings: "lms_spectatorvoicechat", to decide if spectators can talk with live players while a game's in progress. [Kaminsky]
6364 - - Fixed: clients didn't initialize a sector's friction properly in some cases due to a superfluous check that wasn't removed earlier. [Kaminsky]
6465 - - Fixed: the server wouldn't initialize compatflags and compatflags2 properly if entered as command line parameters. [Kaminsky]
6566 - - Fixed: serverinfo CVars entered on the command line were restored in reverse order. [Kaminsky]
diff -r ad7d035b4fb4 -r a195a1e29239 src/chat.cpp
--- a/src/chat.cpp Thu Apr 11 14:55:09 2024 -0400
+++ b/src/chat.cpp Thu Apr 11 15:00:18 2024 -0400
@@ -790,7 +790,7 @@
790790 positionY -= SmallFont->GetHeight( ) * 2 + 1;
791791
792792 // [RC] Tell chatters about the iron curtain of LMS chat.
793- if ( GAMEMODE_AreSpectatorsForbiddenToChatToPlayers() )
793+ if ( GAMEMODE_AreSpectatorsForbiddenToChatToPlayers( false ))
794794 {
795795 bool bDrawNote = true;
796796 note = "NOTE: " TEXTCOLOR_GRAY;
diff -r ad7d035b4fb4 -r a195a1e29239 src/gamemode.cpp
--- a/src/gamemode.cpp Thu Apr 11 14:55:09 2024 -0400
+++ b/src/gamemode.cpp Thu Apr 11 15:00:18 2024 -0400
@@ -923,9 +923,9 @@
923923
924924 //*****************************************************************************
925925 //
926-bool GAMEMODE_AreSpectatorsForbiddenToChatToPlayers( void )
926+bool GAMEMODE_AreSpectatorsForbiddenToChatToPlayers( const bool doVoice )
927927 {
928- if ( ( lmsspectatorsettings & LMS_SPF_CHAT ) == false )
928+ if (( lmsspectatorsettings & ( doVoice ? LMS_SPF_VOICECHAT : LMS_SPF_CHAT )) == false )
929929 {
930930 if (( teamlms || lastmanstanding ) && ( LASTMANSTANDING_GetState( ) == LMSS_INPROGRESS ))
931931 return true;
@@ -939,18 +939,18 @@
939939
940940 //*****************************************************************************
941941 //
942-bool GAMEMODE_IsClientForbiddenToChatToPlayers( const ULONG ulClient )
942+bool GAMEMODE_IsClientForbiddenToChatToPlayers( const ULONG client, const bool doVoice )
943943 {
944944 // [BB] If it's not a valid client, there are no restrictions. Note:
945- // ulClient == MAXPLAYERS means the server wants to say something.
946- if ( ulClient >= MAXPLAYERS )
945+ // client == MAXPLAYERS means the server wants to say something.
946+ if ( client >= MAXPLAYERS )
947947 return false;
948948
949949 // [BB] Ingame players are allowed to chat to other players.
950- if ( players[ulClient].bSpectating == false )
950+ if ( players[client].bSpectating == false )
951951 return false;
952952
953- return GAMEMODE_AreSpectatorsForbiddenToChatToPlayers();
953+ return GAMEMODE_AreSpectatorsForbiddenToChatToPlayers( doVoice );
954954 }
955955
956956 //*****************************************************************************
diff -r ad7d035b4fb4 -r a195a1e29239 src/gamemode.h
--- a/src/gamemode.h Thu Apr 11 14:55:09 2024 -0400
+++ b/src/gamemode.h Thu Apr 11 15:00:18 2024 -0400
@@ -223,8 +223,8 @@
223223 void GAMEMODE_RespawnAllPlayers( BOTEVENT_e BotEvent = NUM_BOTEVENTS, playerstate_t PlayerState = PST_ENTER );
224224 void GAMEMODE_SpawnPlayer( const ULONG ulPlayer, bool bClientUpdate = true );
225225 void GAMEMODE_ResetPlayersKillCount( const bool bInformClients );
226-bool GAMEMODE_AreSpectatorsForbiddenToChatToPlayers( void );
227-bool GAMEMODE_IsClientForbiddenToChatToPlayers( const ULONG ulClient );
226+bool GAMEMODE_AreSpectatorsForbiddenToChatToPlayers( const bool doVoice );
227+bool GAMEMODE_IsClientForbiddenToChatToPlayers( const ULONG client, const bool doVoice );
228228 bool GAMEMODE_PreventPlayersFromJoining( ULONG ulExcludePlayer = MAXPLAYERS );
229229 bool GAMEMODE_AreLivesLimited( void );
230230 bool GAMEMODE_IsPlayerCarryingGameModeItem( player_t *player );
diff -r ad7d035b4fb4 -r a195a1e29239 src/lastmanstanding.cpp
--- a/src/lastmanstanding.cpp Thu Apr 11 14:55:09 2024 -0400
+++ b/src/lastmanstanding.cpp Thu Apr 11 15:00:18 2024 -0400
@@ -751,3 +751,4 @@
751751
752752 CVAR( Flag, lms_spectatorchat, lmsspectatorsettings, LMS_SPF_CHAT );
753753 CVAR( Flag, lms_spectatorview, lmsspectatorsettings, LMS_SPF_VIEW );
754+CVAR( Flag, lms_spectatorvoicechat, lmsspectatorsettings, LMS_SPF_VOICECHAT );
diff -r ad7d035b4fb4 -r a195a1e29239 src/lastmanstanding.h
--- a/src/lastmanstanding.h Thu Apr 11 14:55:09 2024 -0400
+++ b/src/lastmanstanding.h Thu Apr 11 15:00:18 2024 -0400
@@ -87,6 +87,7 @@
8787 {
8888 LMS_SPF_CHAT = ( 1 << 0 ),
8989 LMS_SPF_VIEW = ( 1 << 1 ),
90+ LMS_SPF_VOICECHAT = ( 1 << 2 ),
9091 };
9192
9293 //*****************************************************************************
diff -r ad7d035b4fb4 -r a195a1e29239 src/sv_commands.cpp
--- a/src/sv_commands.cpp Thu Apr 11 14:55:09 2024 -0400
+++ b/src/sv_commands.cpp Thu Apr 11 15:00:18 2024 -0400
@@ -1207,7 +1207,7 @@
12071207 return;
12081208
12091209 // [AK] Potentially prevent spectators from talking to active players during LMS games.
1210- const bool forbidVoiceChatToPlayers = GAMEMODE_IsClientForbiddenToChatToPlayers( player );
1210+ const bool forbidVoiceChatToPlayers = GAMEMODE_IsClientForbiddenToChatToPlayers( player, true );
12111211 const int transmitFilter = players[player].userinfo.GetVoiceTransmitFilter( );
12121212
12131213 NetCommand command( SVC_PLAYERVOIPAUDIOPACKET );
diff -r ad7d035b4fb4 -r a195a1e29239 src/sv_main.cpp
--- a/src/sv_main.cpp Thu Apr 11 14:55:09 2024 -0400
+++ b/src/sv_main.cpp Thu Apr 11 15:00:18 2024 -0400
@@ -1223,7 +1223,7 @@
12231223 return;
12241224
12251225 // Potentially prevent spectators from talking to active players during LMS games.
1226- const bool bForbidChatToPlayers = GAMEMODE_IsClientForbiddenToChatToPlayers( ulPlayer );
1226+ const bool bForbidChatToPlayers = GAMEMODE_IsClientForbiddenToChatToPlayers( ulPlayer, false );
12271227 FString cleanedChatString = pszString;
12281228
12291229 // [BB] If the chat string is empty now, it only contained crap and is ignored.