Fix wrong max edicts clamp. Add game_dll_linux and game_dll_osx to gameinfo.txt. Fix crash in R_ChangeVideoSettings

This commit is contained in:
Alibek Omarov 2018-04-24 05:50:10 +03:00
parent efe8ddf151
commit 176b31b4a2
3 changed files with 15 additions and 4 deletions

View File

@ -2786,7 +2786,7 @@ void CL_Init( void )
COM_ResetLibraryError();
if( !CL_LoadProgs( va( "%s/%s", GI->dll_path, SI.clientlib)))
Host_Error( "can't initialize client.dll\n" );
Host_Error( "can't initialize %s: %s\n", SI.clientlib, COM_GetLibraryError() );
cls.initialized = true;
cl.maxclients = 1; // allow to drawing player in menu

View File

@ -691,8 +691,11 @@ void SCR_VidInit( void )
memset( &clgame.centerPrint, 0, sizeof( clgame.centerPrint ));
// update screen sizes for menu
gameui.globals->scrWidth = glState.width;
gameui.globals->scrHeight = glState.height;
if( gameui.globals )
{
gameui.globals->scrWidth = glState.width;
gameui.globals->scrHeight = glState.height;
}
VGui_Startup( glState.width, glState.height );

View File

@ -930,9 +930,17 @@ static void FS_WriteGameInfo( const char *filepath, gameinfo_t *GameInfo )
if( Q_strlen( GameInfo->dll_path ))
FS_Printf( f, "dllpath\t\t\"%s\"\n", GameInfo->dll_path );
if( Q_strlen( GameInfo->game_dll ))
FS_Printf( f, "gamedll\t\t\"%s\"\n", GameInfo->game_dll );
if( Q_strlen( GameInfo->game_dll_linux ))
FS_Printf( f, "gamedll_linux\t\t\"%s\"\n", GameInfo->game_dll_linux );
if( Q_strlen( GameInfo->game_dll_osx ))
FS_Printf( f, "gamedll_osx\t\t\"%s\"\n", GameInfo->game_dll_osx );
if( Q_strlen( GameInfo->iconpath ))
FS_Printf( f, "icon\t\t\"%s\"\n", GameInfo->iconpath );
@ -1125,7 +1133,7 @@ void FS_ParseGenericGameInfo( gameinfo_t *GameInfo, const char *buf, const qbool
else if( !Q_stricmp( token, isGameInfo ? "max_edicts" : "edicts" ))
{
pfile = COM_ParseFile( pfile, token );
GameInfo->max_edicts = bound( 600, Q_atoi( token ), 4096 );
GameInfo->max_edicts = bound( 600, Q_atoi( token ), MAX_EDICTS );
}
// only for gameinfo
else if( isGameInfo )