mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-02-28 14:51:06 +00:00
If game DLL isn't found, fall back to fs_game_base DLL
loosely based on #517, with additional fallback to base.dll if the one for fs_game_base isn't found either
This commit is contained in:
parent
47d803b4fe
commit
373f59c484
1 changed files with 18 additions and 4 deletions
|
@ -2688,13 +2688,27 @@ void idCommonLocal::LoadGameDLL( void ) {
|
||||||
// there was no gamelib for this mod, use default one from base game
|
// there was no gamelib for this mod, use default one from base game
|
||||||
if (!gameDLL) {
|
if (!gameDLL) {
|
||||||
common->Printf( "\n" );
|
common->Printf( "\n" );
|
||||||
common->Warning( "couldn't load mod-specific %s, defaulting to base game's library!\n", dll );
|
|
||||||
sys->DLL_GetFileName(BASE_GAMEDIR, dll, sizeof(dll));
|
const char *fs_base = cvarSystem->GetCVarString("fs_game_base");
|
||||||
LoadGameDLLbyName(dll, s);
|
if (fs_base && fs_base[0]) {
|
||||||
|
common->Warning( "couldn't load mod-specific %s, defaulting to library of fs_game_base (%s)!\n", dll, fs_base);
|
||||||
|
sys->DLL_GetFileName(fs_base, dll, sizeof(dll));
|
||||||
|
LoadGameDLLbyName(dll, s);
|
||||||
|
if ( !gameDLL ) {
|
||||||
|
common->Warning( "couldn't load fs_game_base lib %s either, defaulting to base game's library!\n", dll);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
common->Warning( "couldn't load mod-specific %s, defaulting to base game's library!\n", dll );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !gameDLL ) {
|
||||||
|
sys->DLL_GetFileName(BASE_GAMEDIR, dll, sizeof(dll));
|
||||||
|
LoadGameDLLbyName(dll, s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !gameDLL ) {
|
if ( !gameDLL ) {
|
||||||
common->FatalError( "couldn't load game dynamic library" );
|
common->FatalError( "couldn't load game dynamic library '%s'", dll );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue