Skip to content
Permalink
Browse files
All: Fix loading map from command line in SP
map command unloads the UI VM and then cinematic command is processed.
Video is not displayed because UI VM is not loaded and input causes
error that UI VM is NULL. I changed it to use Quake 3 behavior of only
playing intro if there are no command line arguments. This does not
affect MP as there is no logo or intro video present.

Fixes running "iowolfsp.x86_64 +spmap escape1".
  • Loading branch information
zturtleman committed Nov 29, 2018
1 parent ef829a9 commit 7ae64d4fdf57f14b5a1de04f9eaeb4e7f3db7e75
Showing with 23 additions and 25 deletions.
  1. +11 −12 MP/code/qcommon/common.c
  2. +12 −13 SP/code/qcommon/common.c
@@ -2896,6 +2896,17 @@ void Com_Init( char *commandLine ) {
// add + commands from command line
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
}
}

// start in full screen ui mode
@@ -2910,18 +2921,6 @@ 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;

// always set the cvar, but only print the info if it makes sense.
@@ -2444,6 +2444,18 @@ void Com_Init( char *commandLine ) {
// add + commands from command line
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" ); //----(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
}
}

// start in full screen ui mode
@@ -2456,19 +2468,6 @@ 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" ); //----(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;

// always set the cvar, but only print the info if it makes sense.

0 comments on commit 7ae64d4

Please sign in to comment.