This is a fork of Zandronum Beta for Mac Os (Silicon and Intel)
Revisão | 8836885fd4326030f5113b39a2f41918620e6e8f (tree) |
---|---|
Hora | 2022-12-16 03:58:54 |
Autor | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
Added the CVar "sv_distinguishteamchatlines", which distinguishes team chat messages from normal chat messages in the server console/logfile (addresses 0036).
@@ -35,6 +35,7 @@ | ||
35 | 35 | + - Added the CCMD "rcon_logout" so that clients with RCON access may logout if they want to. This also changes the old behaviour where a client who already had RCON access could lose it if they resent the wrong password to the server. [Kaminsky] |
36 | 36 | + - Added ACS function: "SetGameplaySetting", allowing modders to change gameplay-related CVars on the fly. [Kaminsky] |
37 | 37 | + - Added "offlineonly" and "onlineonly" options to the game settings feature of the GAMEMODE lump. This allows some CVars to only be configured for offline or online games, or both. [Kaminsky] |
38 | ++ - Added the CVar "sv_distinguishteamchatlines", which distinguishes team chat messages from normal chat messages in the server console/logfile when sv_markchatlines is enabled. [Kaminsky] | |
38 | 39 | - - Fixed: clients didn't initialize a sector's friction properly in some cases due to a superfluous check that wasn't removed earlier. [Kaminsky] |
39 | 40 | - - Fixed: the server wouldn't initialize compatflags and compatflags2 properly if entered as command line parameters. [Kaminsky] |
40 | 41 | - - Fixed: serverinfo CVars entered on the command line were restored in reverse order. [Kaminsky] |
@@ -275,6 +275,7 @@ | ||
275 | 275 | CVAR( Bool, sv_minimizetosystray, true, CVAR_ARCHIVE ) |
276 | 276 | CVAR( Int, sv_queryignoretime, 10, CVAR_ARCHIVE ) |
277 | 277 | CVAR( Bool, sv_markchatlines, false, CVAR_ARCHIVE ) |
278 | +CVAR( Int, sv_distinguishteamchatlines, 0, CVAR_ARCHIVE ) | |
278 | 279 | CVAR( Flag, sv_nokill, dmflags2, DF2_NOSUICIDE ) |
279 | 280 | CVAR( Bool, sv_pure, true, CVAR_SERVERINFO | CVAR_LATCH ) |
280 | 281 | CVAR( Int, sv_maxclientsperip, 2, CVAR_ARCHIVE | CVAR_SERVERINFO ) |
@@ -1228,6 +1229,31 @@ | ||
1228 | 1229 | if ( sv_markchatlines ) |
1229 | 1230 | message = "CHAT "; |
1230 | 1231 | |
1232 | + // [AK] Distinguish team chat messages from normal chat messages if we want to. | |
1233 | + if (( sv_distinguishteamchatlines > 0 ) && ( ulMode == CHATMODE_TEAM )) | |
1234 | + { | |
1235 | + if ( PLAYER_IsTrueSpectator( &players[ulPlayer] )) | |
1236 | + { | |
1237 | + message += "<SPEC> "; | |
1238 | + } | |
1239 | + else if ( players[ulPlayer].bOnTeam ) | |
1240 | + { | |
1241 | + // [AK] If sv_distinguishteamchatlines is set to 1, then show the team's name. | |
1242 | + // If it's greater than 1, then show the team's number instead. | |
1243 | + if ( sv_distinguishteamchatlines == 1 ) | |
1244 | + { | |
1245 | + FString teamName = TEAM_GetName( players[ulPlayer].Team ); | |
1246 | + teamName.ToUpper( ); | |
1247 | + | |
1248 | + message.AppendFormat( "<%s> ", teamName.GetChars( )); | |
1249 | + } | |
1250 | + else | |
1251 | + { | |
1252 | + message.AppendFormat( "<TEAM #%d> ", players[ulPlayer].Team + 1 ); | |
1253 | + } | |
1254 | + } | |
1255 | + } | |
1256 | + | |
1231 | 1257 | // Print this message in the server's local window. |
1232 | 1258 | if ( strnicmp( "/me", pszString, 3 ) == 0 ) |
1233 | 1259 | { |