From bb7ad5538298e4b1e9470355992ec597405df46c Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Thu, 16 Jun 2016 02:30:14 +0200 Subject: [PATCH] Only play logo/intro if their filenames have been defined in q_shared.h --- code/qcommon/common.c | 6 ++++++ code/ui/ui_main.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/code/qcommon/common.c b/code/qcommon/common.c index c3c595b5..1d4ef611 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -72,7 +72,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; @@ -2805,11 +2807,15 @@ void Com_Init( char *commandLine ) { if ( !Com_AddStartupCommands() ) { // if the user didn't give any commands, run default action 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 } } diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index c1cdf740..a1539f33 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -3222,7 +3222,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" ); } else if (Q_stricmp(name, "getCDKey") == 0) { char out[17];