the "nextdemo" cvar is now also used when playback stops before reaching the demo's end

This commit is contained in:
myT 2018-01-24 02:19:57 +01:00
parent eaa376a292
commit 3e3c1b2431
4 changed files with 20 additions and 4 deletions

View file

@ -1,6 +1,8 @@
DD Mmm 18 - 1.50
chg: the "nextdemo" cvar is now also used when playback stops before reaching the demo's end
chg: mouse motion is no longer forwarded to the mod when the console is down
chg: with 2+ monitors, having the console down will always disable input grabbing

View file

@ -1212,3 +1212,9 @@ qbool UI_GameCommand()
return (uivm && VM_Call( uivm, UI_CONSOLE_COMMAND, cls.realtime ));
}
qbool CL_DemoPlaying()
{
return clc.demoplaying;
}

View file

@ -246,10 +246,6 @@ void QDECL Com_ErrorExt( int code, int module, qbool realError, const char *fmt,
static int lastErrorTime;
static int errorCount;
#ifndef DEDICATED
void CL_ForwardUIError( int level, int module, const char* error ); // client.h
#endif
// make sure we can get at our local stuff
FS_PureServerSetLoadedPaks( "" );
@ -302,7 +298,10 @@ void QDECL Com_ErrorExt( int code, int module, qbool realError, const char *fmt,
Com_Printf( "ERROR: %s\n", com_errorMessage );
SV_Shutdown( va("Server crashed: %s", com_errorMessage) );
#ifndef DEDICATED
const qbool demo = CL_DemoPlaying();
CL_Disconnect( qtrue );
if ( demo )
CL_NextDemo();
CL_FlushMemory(); // shuts down the VMs and starts them back up
if ( realError )
CL_ForwardUIError( code == ERR_DROP ? EXT_ERRLEV_DROP : EXT_ERRLEV_DISC, module, com_errorMessage );

View file

@ -1004,6 +1004,15 @@ void CL_FlushMemory();
void CL_StartHunkUsers( void );
// start all the client stuff using the hunk
void CL_ForwardUIError( int level, int module, const char* error );
// error forwarding extension
qbool CL_DemoPlaying();
// qtrue if demo playback is in progress
void CL_NextDemo();
// invoke the "nextdemo" cvar as a command, if not empty
void Key_KeyNameCompletion( void (*callback)(const char *s) );
// for /bind and /unbind auto-completion