[quake3-commits] r2272 - in trunk/code: cgame game

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Jun 18 13:09:33 EDT 2012


Author: ztm
Date: 2012-06-18 13:09:33 -0400 (Mon, 18 Jun 2012)
New Revision: 2272

Modified:
   trunk/code/cgame/cg_consolecmds.c
   trunk/code/cgame/cg_local.h
   trunk/code/cgame/cg_main.c
   trunk/code/cgame/cg_servercmds.c
   trunk/code/cgame/cg_view.c
   trunk/code/game/g_cmds.c
Log:
Made more code for Team Arena be inside ifdef MISSIONPACK, from Ensiform.

Modified: trunk/code/cgame/cg_consolecmds.c
===================================================================
--- trunk/code/cgame/cg_consolecmds.c	2012-06-18 16:39:58 UTC (rev 2271)
+++ trunk/code/cgame/cg_consolecmds.c	2012-06-18 17:09:33 UTC (rev 2272)
@@ -24,8 +24,8 @@
 // executed by a key binding
 
 #include "cg_local.h"
+#ifdef MISSIONPACK
 #include "../ui/ui_shared.h"
-#ifdef MISSIONPACK
 extern menuDef_t *menuScoreboard;
 #endif
 
@@ -210,6 +210,7 @@
 	trap_SendClientCommand( command );
 }
 
+#ifdef MISSIONPACK
 static void CG_VoiceTellTarget_f( void ) {
 	int		clientNum;
 	char	command[128];
@@ -240,7 +241,6 @@
 	trap_SendClientCommand( command );
 }
 
-#ifdef MISSIONPACK
 static void CG_NextTeamMember_f( void ) {
   CG_SelectNextPlayer();
 }
@@ -467,12 +467,12 @@
 	{ "weapnext", CG_NextWeapon_f },
 	{ "weapprev", CG_PrevWeapon_f },
 	{ "weapon", CG_Weapon_f },
+	{ "tcmd", CG_TargetCommand_f },
 	{ "tell_target", CG_TellTarget_f },
 	{ "tell_attacker", CG_TellAttacker_f },
+#ifdef MISSIONPACK
 	{ "vtell_target", CG_VoiceTellTarget_f },
 	{ "vtell_attacker", CG_VoiceTellAttacker_f },
-	{ "tcmd", CG_TargetCommand_f },
-#ifdef MISSIONPACK
 	{ "loadhud", CG_LoadHud_f },
 	{ "nextTeamMember", CG_NextTeamMember_f },
 	{ "prevTeamMember", CG_PrevTeamMember_f },
@@ -552,6 +552,7 @@
 	trap_AddCommand ("say");
 	trap_AddCommand ("say_team");
 	trap_AddCommand ("tell");
+#ifdef MISSIONPACK
 	trap_AddCommand ("vsay");
 	trap_AddCommand ("vsay_team");
 	trap_AddCommand ("vtell");
@@ -559,6 +560,7 @@
 	trap_AddCommand ("vosay");
 	trap_AddCommand ("vosay_team");
 	trap_AddCommand ("votell");
+#endif
 	trap_AddCommand ("give");
 	trap_AddCommand ("god");
 	trap_AddCommand ("notarget");

Modified: trunk/code/cgame/cg_local.h
===================================================================
--- trunk/code/cgame/cg_local.h	2012-06-18 16:39:58 UTC (rev 2271)
+++ trunk/code/cgame/cg_local.h	2012-06-18 17:09:33 UTC (rev 2272)
@@ -590,10 +590,12 @@
 	int			soundTime;
 	qhandle_t	soundBuffer[MAX_SOUNDBUFFER];
 
+#ifdef MISSIONPACK
 	// for voice chat buffer
 	int			voiceChatTime;
 	int			voiceChatBufferIn;
 	int			voiceChatBufferOut;
+#endif
 
 	// warmup countdown
 	int			warmup;
@@ -1145,8 +1147,10 @@
 extern	vmCvar_t		cg_deferPlayers;
 extern	vmCvar_t		cg_drawFriend;
 extern	vmCvar_t		cg_teamChatsOnly;
+#ifdef MISSIONPACK
 extern	vmCvar_t		cg_noVoiceChats;
 extern	vmCvar_t		cg_noVoiceText;
+#endif
 extern  vmCvar_t		cg_scorePlum;
 extern	vmCvar_t		cg_smoothClients;
 extern	vmCvar_t		pmove_fixed;
@@ -1445,10 +1449,12 @@
 void CG_ExecuteNewServerCommands( int latestSequence );
 void CG_ParseServerinfo( void );
 void CG_SetConfigValues( void );
+void CG_ShaderStateChanged(void);
+#ifdef MISSIONPACK
 void CG_LoadVoiceChats( void );
-void CG_ShaderStateChanged(void);
 void CG_VoiceChatLocal( int mode, qboolean voiceOnly, int clientNum, int color, const char *cmd );
 void CG_PlayBufferedVoiceChats( void );
+#endif
 
 //
 // cg_playerstate.c

Modified: trunk/code/cgame/cg_main.c
===================================================================
--- trunk/code/cgame/cg_main.c	2012-06-18 16:39:58 UTC (rev 2271)
+++ trunk/code/cgame/cg_main.c	2012-06-18 17:09:33 UTC (rev 2272)
@@ -158,8 +158,10 @@
 vmCvar_t	cg_teamOverlayUserinfo;
 vmCvar_t	cg_drawFriend;
 vmCvar_t	cg_teamChatsOnly;
+#ifdef MISSIONPACK
 vmCvar_t	cg_noVoiceChats;
 vmCvar_t	cg_noVoiceText;
+#endif
 vmCvar_t	cg_hudFiles;
 vmCvar_t 	cg_scorePlum;
 vmCvar_t 	cg_smoothClients;
@@ -272,8 +274,10 @@
 	{ &cg_stats, "cg_stats", "0", 0 },
 	{ &cg_drawFriend, "cg_drawFriend", "1", CVAR_ARCHIVE },
 	{ &cg_teamChatsOnly, "cg_teamChatsOnly", "0", CVAR_ARCHIVE },
+#ifdef MISSIONPACK
 	{ &cg_noVoiceChats, "cg_noVoiceChats", "0", CVAR_ARCHIVE },
 	{ &cg_noVoiceText, "cg_noVoiceText", "0", CVAR_ARCHIVE },
+#endif
 	// the following variables are created in other parts of the system,
 	// but we also reference them here
 	{ &cg_buildScript, "com_buildScript", "0", 0 },	// force loading of all possible data amd error on failures

Modified: trunk/code/cgame/cg_servercmds.c
===================================================================
--- trunk/code/cgame/cg_servercmds.c	2012-06-18 16:39:58 UTC (rev 2271)
+++ trunk/code/cgame/cg_servercmds.c	2012-06-18 17:09:33 UTC (rev 2272)
@@ -25,6 +25,7 @@
 // be a valid snapshot this frame
 
 #include "cg_local.h"
+#ifdef MISSIONPACK
 #include "../../ui/menudef.h"
 
 typedef struct {
@@ -46,7 +47,6 @@
 
 static const int numValidOrders = ARRAY_LEN(validOrders);
 
-#ifdef MISSIONPACK
 static int CG_ValidOrder(const char *p) {
 	int i;
 	for (i = 0; i < numValidOrders; i++) {
@@ -487,6 +487,8 @@
 	trap_Cvar_Set("cg_thirdPerson", "0");
 }
 
+#ifdef MISSIONPACK
+
 #define MAX_VOICEFILESIZE	16384
 #define MAX_VOICEFILES		8
 #define MAX_VOICECHATS		64
@@ -940,7 +942,6 @@
 =================
 */
 void CG_VoiceChat( int mode ) {
-#ifdef MISSIONPACK
 	const char *cmd;
 	int clientNum, color;
 	qboolean voiceOnly;
@@ -959,8 +960,8 @@
 	}
 
 	CG_VoiceChatLocal( mode, voiceOnly, clientNum, color, cmd );
+}
 #endif
-}
 
 /*
 =================
@@ -1040,6 +1041,8 @@
 		CG_Printf( "%s\n", text );
 		return;
 	}
+
+#ifdef MISSIONPACK
 	if ( !strcmp( cmd, "vchat" ) ) {
 		CG_VoiceChat( SAY_ALL );
 		return;
@@ -1054,6 +1057,7 @@
 		CG_VoiceChat( SAY_TELL );
 		return;
 	}
+#endif
 
 	if ( !strcmp( cmd, "scores" ) ) {
 		CG_ParseScores();

Modified: trunk/code/cgame/cg_view.c
===================================================================
--- trunk/code/cgame/cg_view.c	2012-06-18 16:39:58 UTC (rev 2271)
+++ trunk/code/cgame/cg_view.c	2012-06-18 17:09:33 UTC (rev 2272)
@@ -818,8 +818,10 @@
 	// add buffered sounds
 	CG_PlayBufferedSounds();
 
+#ifdef MISSIONPACK
 	// play buffered voice chats
 	CG_PlayBufferedVoiceChats();
+#endif
 
 	// finish up the rest of the refdef
 	if ( cg.testModelEntity.hModel ) {

Modified: trunk/code/game/g_cmds.c
===================================================================
--- trunk/code/game/g_cmds.c	2012-06-18 16:39:58 UTC (rev 2271)
+++ trunk/code/game/g_cmds.c	2012-06-18 17:09:33 UTC (rev 2272)
@@ -22,7 +22,9 @@
 //
 #include "g_local.h"
 
+#ifdef MISSIONPACK
 #include "../../ui/menudef.h"			// for the voice chats
+#endif
 
 /*
 ==================
@@ -937,6 +939,7 @@
 }
 
 
+#ifdef MISSIONPACK
 static void G_VoiceTo( gentity_t *ent, gentity_t *other, int mode, const char *id, qboolean voiceonly ) {
 	int color;
 	char *cmd;
@@ -1132,6 +1135,7 @@
 	// just say something
 	G_Voice( ent, NULL, SAY_ALL, VOICECHAT_TAUNT, qfalse );
 }
+#endif
 
 
 
@@ -1605,6 +1609,7 @@
 		Cmd_Tell_f ( ent );
 		return;
 	}
+#ifdef MISSIONPACK
 	if (Q_stricmp (cmd, "vsay") == 0) {
 		Cmd_Voice_f (ent, SAY_ALL, qfalse, qfalse);
 		return;
@@ -1633,6 +1638,7 @@
 		Cmd_VoiceTaunt_f ( ent );
 		return;
 	}
+#endif
 	if (Q_stricmp (cmd, "score") == 0) {
 		Cmd_Score_f (ent);
 		return;



More information about the quake3-commits mailing list