[iortcw] 75/152: All: Only play logo/intro if their filenames have been defined in q_shared.h

Simon McVittie smcv at debian.org
Fri Sep 8 10:40:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.5a
in repository iortcw.

commit ebf973bb8cb6821e87afb33aa87e7ae3e6edb402
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date:   Sat Jun 18 16:48:36 2016 -0400

    All: Only play logo/intro if their filenames have been defined in q_shared.h
---
 MP/code/qcommon/common.c | 8 ++++++++
 MP/code/ui/ui_main.c     | 2 ++
 SP/code/qcommon/common.c | 8 ++++++++
 SP/code/ui/ui_main.c     | 4 ++++
 4 files changed, 22 insertions(+)

diff --git a/MP/code/qcommon/common.c b/MP/code/qcommon/common.c
index 91c49c5..b13477e 100644
--- a/MP/code/qcommon/common.c
+++ b/MP/code/qcommon/common.c
@@ -81,7 +81,9 @@ cvar_t  *com_version;
 cvar_t	*com_legacyversion;
 cvar_t  *com_blood;
 cvar_t  *com_buildScript;   // for automated data building scripts
+#ifdef CINEMATICS_INTRO
 cvar_t  *com_introPlayed;
+#endif
 cvar_t  *cl_paused;
 cvar_t  *sv_paused;
 cvar_t  *cl_packetdelay;
@@ -2822,7 +2824,9 @@ void Com_Init( char *commandLine ) {
 	com_busyWait = Cvar_Get("com_busyWait", "0", CVAR_ARCHIVE);
 	Cvar_Get("com_errorMessage", "", CVAR_ROM | CVAR_NORESTART);
 
+#ifdef CINEMATICS_INTRO
 	com_introPlayed = Cvar_Get( "com_introplayed", "0", CVAR_ARCHIVE );
+#endif
 	com_recommendedSet = Cvar_Get( "com_recommendedSet", "0", CVAR_ARCHIVE );
 
 	s = va( "%s %s %s", Q3_VERSION, PLATFORM_STRING, __DATE__ );
@@ -2899,11 +2903,15 @@ void Com_Init( char *commandLine ) {
 	Cvar_Set( "com_recommendedSet", "1" );
 
 	if ( !com_dedicated->integer ) {
+#ifdef CINEMATICS_LOGO
 		Cbuf_AddText( "cinematic " CINEMATICS_LOGO "\n" );
+#endif
+#ifdef CINEMATICS_INTRO
 		if ( !com_introPlayed->integer ) {
 			Cvar_Set( com_introPlayed->name, "1" );
 			Cvar_Set( "nextmap", "cinematic " CINEMATICS_INTRO );
 		}
+#endif
 	}
 
 	com_fullyInitialized = qtrue;
diff --git a/MP/code/ui/ui_main.c b/MP/code/ui/ui_main.c
index 482b9a8..724c25e 100644
--- a/MP/code/ui/ui_main.c
+++ b/MP/code/ui/ui_main.c
@@ -4603,7 +4603,9 @@ static void UI_RunMenuScript( char **args ) {
 			trap_Cmd_ExecuteText( EXEC_NOW, "exec language.cfg\n" );       // NERVE - SMF
 			trap_Cmd_ExecuteText( EXEC_NOW, "setRecommended\n" );     // NERVE - SMF
 			Controls_SetDefaults();
+#ifdef CINEMATICS_INTRO
 			trap_Cvar_Set( "com_introPlayed", "1" );
+#endif
 			trap_Cvar_Set( "com_recommendedSet", "1" );                   // NERVE - SMF
 			trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart\n" );
 		} else if ( Q_stricmp( name, "getCDKey" ) == 0 ) {
diff --git a/SP/code/qcommon/common.c b/SP/code/qcommon/common.c
index 14d6340..f89dfed 100644
--- a/SP/code/qcommon/common.c
+++ b/SP/code/qcommon/common.c
@@ -82,7 +82,9 @@ cvar_t  *com_showtrace;
 cvar_t  *com_version;
 cvar_t  *com_blood;
 cvar_t  *com_buildScript;   // for automated data building scripts
+#ifdef CINEMATICS_INTRO
 cvar_t  *com_introPlayed;
+#endif
 cvar_t  *cl_paused;
 cvar_t  *sv_paused;
 cvar_t  *cl_packetdelay;
@@ -2368,7 +2370,9 @@ void Com_Init( char *commandLine ) {
 	com_busyWait = Cvar_Get("com_busyWait", "0", CVAR_ARCHIVE);
 	Cvar_Get("com_errorMessage", "", CVAR_ROM | CVAR_NORESTART);
 
+#ifdef CINEMATICS_INTRO
 	com_introPlayed = Cvar_Get( "com_introplayed", "0", CVAR_ARCHIVE );
+#endif
 	com_recommendedSet = Cvar_Get( "com_recommendedSet", "0", CVAR_ARCHIVE );
 
 	Cvar_Get( "savegame_loading", "0", CVAR_ROM );
@@ -2437,12 +2441,16 @@ void Com_Init( char *commandLine ) {
 	}
 
 	if ( !com_dedicated->integer ) {
+#ifdef CINEMATICS_LOGO
 		//Cbuf_AddText ("cinematic " CINEMATICS_LOGO "\n");
+#endif
+#ifdef CINEMATICS_INTRO
 		if ( !com_introPlayed->integer ) {
 			//Cvar_Set( com_introPlayed->name, "1" );		//----(SA)	force this to get played every time (but leave cvar for override)
 			Cbuf_AddText( "cinematic " CINEMATICS_INTRO " 3\n" );
 			//Cvar_Set( "nextmap", "cinematic " CINEMATICS_INTRO );
 		}
+#endif
 	}
 
 	com_fullyInitialized = qtrue;
diff --git a/SP/code/ui/ui_main.c b/SP/code/ui/ui_main.c
index 5e37e84..20ef0be 100644
--- a/SP/code/ui/ui_main.c
+++ b/SP/code/ui/ui_main.c
@@ -4627,7 +4627,9 @@ static void UI_RunMenuScript( char **args ) {
 //			trap_Cmd_ExecuteText( EXEC_APPEND, "exec default.cfg\n");
 //			trap_Cmd_ExecuteText( EXEC_APPEND, "cvar_restart\n");
 //			Controls_SetDefaults();
+#ifdef CINEMATICS_INTRO
 //			trap_Cvar_Set("com_introPlayed", "1" );
+#endif
 //			trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart\n" );
 
 // from MP 11/12/01
@@ -4636,7 +4638,9 @@ static void UI_RunMenuScript( char **args ) {
 			trap_Cmd_ExecuteText( EXEC_NOW, "exec language.cfg\n" );       // NERVE - SMF
 			trap_Cmd_ExecuteText( EXEC_NOW, "setRecommended\n" );     // NERVE - SMF
 			Controls_SetDefaults();
+#ifdef CINEMATICS_INTRO
 			trap_Cvar_Set( "com_introPlayed", "1" );
+#endif
 			trap_Cvar_Set( "com_recommendedSet", "1" );                   // NERVE - SMF
 			trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart\n" );
 // end from MP

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list