diff --git a/neo/framework/FileSystem.cpp b/neo/framework/FileSystem.cpp index d47015c8..c7e13437 100644 --- a/neo/framework/FileSystem.cpp +++ b/neo/framework/FileSystem.cpp @@ -2676,12 +2676,20 @@ void idFileSystemLocal::Init( void ) { // spawn a thread to handle background file reads StartBackgroundDownloadThread(); - // if we can't find default.cfg, assume that the paths are - // busted and error out now, rather than getting an unreadable - // graphics screen when the font fails to load - // Dedicated servers can run with no outside files at all if ( ReadFile( "default.cfg", NULL, NULL ) <= 0 ) { - common->FatalError( "Couldn't load default.cfg" ); + // DG: the demo gamedata is in demo/ instead of base/. to make it "just work", add a fallback for that + if(fs_game.GetString()[0] == '\0' || idStr::Icmp(fs_game.GetString(), BASE_GAMEDIR) == 0) { + common->Warning("Couldn't find default.cfg in %s/, trying again with demo/\n", BASE_GAMEDIR); + fs_game.SetString("demo"); + fs_game_base.SetString("demo"); + Restart(); + } else { + // if we can't find default.cfg, assume that the paths are + // busted and error out now, rather than getting an unreadable + // graphics screen when the font fails to load + // Dedicated servers can run with no outside files at all + common->FatalError( "Couldn't load default.cfg" ); + } } } @@ -2696,6 +2704,9 @@ void idFileSystemLocal::Restart( void ) { Startup( ); + // spawn a thread to handle background file reads + StartBackgroundDownloadThread(); + // if we can't find default.cfg, assume that the paths are // busted and error out now, rather than getting an unreadable // graphics screen when the font fails to load