10 Oct 2018
This commit is contained in:
parent
32ef7c0e29
commit
b78a1e6ea3
|
@ -725,7 +725,7 @@ void CL_DemoCompleted( void )
|
|||
|
||||
CL_StopPlayback();
|
||||
|
||||
if( !CL_NextDemo() && host_developer.value <= DEV_NONE )
|
||||
if( !CL_NextDemo() && !cls.changedemo )
|
||||
UI_SetActiveMenu( true );
|
||||
|
||||
Cvar_SetValue( "v_dark", 0.0f );
|
||||
|
@ -795,6 +795,7 @@ qboolean CL_ReadRawNetworkData( byte *buffer, size_t *length )
|
|||
}
|
||||
}
|
||||
|
||||
cls.netchan.last_received = host.realtime;
|
||||
cls.netchan.total_received += msglen;
|
||||
*length = msglen;
|
||||
|
||||
|
@ -888,6 +889,7 @@ qboolean CL_DemoReadMessageQuake( byte *buffer, size_t *length )
|
|||
}
|
||||
}
|
||||
|
||||
cls.netchan.last_received = host.realtime;
|
||||
cls.netchan.total_received += msglen;
|
||||
*length = msglen;
|
||||
|
||||
|
@ -1312,6 +1314,7 @@ void CL_CheckStartupDemos( void )
|
|||
|
||||
// run demos loop in background mode
|
||||
Cvar_SetValue( "v_dark", 1.0f );
|
||||
cls.demos_pending = false;
|
||||
cls.demonum = 0;
|
||||
CL_NextDemo ();
|
||||
}
|
||||
|
@ -1594,6 +1597,10 @@ Return to looping demos
|
|||
*/
|
||||
void CL_Demos_f( void )
|
||||
{
|
||||
// demos is starting up...
|
||||
if( cls.demos_pending )
|
||||
return;
|
||||
|
||||
if( cls.key_dest != key_menu )
|
||||
{
|
||||
Con_Printf( "'demos' is not valid from the console\n" );
|
||||
|
|
|
@ -2101,7 +2101,7 @@ void S_Play2_f( void )
|
|||
|
||||
if( Cmd_Argc() == 1 )
|
||||
{
|
||||
Con_Printf( S_USAGE "play <soundfile>\n" );
|
||||
Con_Printf( S_USAGE "play2 <soundfile>\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -788,6 +788,8 @@ assume GameInfo is valid
|
|||
static void FS_WriteGameInfo( const char *filepath, gameinfo_t *GameInfo )
|
||||
{
|
||||
file_t *f = FS_Open( filepath, "w", false ); // we in binary-mode
|
||||
int i, write_ambients = false;
|
||||
|
||||
if( !f ) Sys_Error( "FS_WriteGameInfo: can't write %s\n", filepath ); // may be disk-space is out?
|
||||
|
||||
FS_Print( f, "// generated by Xash3D\n\n\n" );
|
||||
|
@ -862,6 +864,19 @@ static void FS_WriteGameInfo( const char *filepath, gameinfo_t *GameInfo )
|
|||
if( GameInfo->max_particles > 0 )
|
||||
FS_Printf( f, "max_particles\t%i\n", GameInfo->max_particles );
|
||||
|
||||
for( i = 0; i < NUM_AMBIENTS; i++ )
|
||||
{
|
||||
if( *GameInfo->ambientsound[i] )
|
||||
{
|
||||
if( !write_ambients )
|
||||
{
|
||||
FS_Print( f, "\n" );
|
||||
write_ambients = true;
|
||||
}
|
||||
FS_Printf( f, "ambient%i\t\t%s\n", i, GameInfo->ambientsound[i] );
|
||||
}
|
||||
}
|
||||
|
||||
FS_Print( f, "\n\n\n" );
|
||||
FS_Close( f ); // all done
|
||||
}
|
||||
|
|
|
@ -418,7 +418,7 @@ double Host_CalcFPS( void )
|
|||
if( host.type != HOST_DEDICATED && Host_IsLocalGame( ) && !CL_IsTimeDemo( ))
|
||||
{
|
||||
// ajdust fps for vertical synchronization
|
||||
if( gl_vsync != NULL && gl_vsync->value )
|
||||
if( CVAR_TO_BOOL( gl_vsync ))
|
||||
{
|
||||
if( vid_displayfrequency->value != 0.0f )
|
||||
fps = vid_displayfrequency->value;
|
||||
|
@ -683,7 +683,7 @@ void Host_InitCommon( const char *hostname, qboolean bChangeGame )
|
|||
host.con_showalways = true;
|
||||
|
||||
// we can specified custom name, from Sys_NewInstance
|
||||
if( GetModuleFileName( NULL, szTemp, sizeof( szTemp )) && !host.change_game )
|
||||
if( GetModuleFileName( NULL, szTemp, sizeof( szTemp )))
|
||||
COM_FileBase( szTemp, SI.exeName );
|
||||
|
||||
COM_ExtractFilePath( szTemp, szRootPath );
|
||||
|
|
Reference in New Issue