Skip to content

Commit

Permalink
Merge pull request #21 from merlin1991/Q3-gamepack-fix
Browse files Browse the repository at this point in the history
copy shaderlist for Q3 if missing and make sure the config folder for *.game files exists
  • Loading branch information
TTimo committed Mar 26, 2012
2 parents f3eedec + 075e39d commit 686a211
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions radiant/preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3408,6 +3408,9 @@ void CGameInstall::Run() {
// write out the game file
Str gameFilePath = g_strAppPath.GetBuffer();
gameFilePath += "games/";
if(CheckFile(gameFilePath) != PATH_DIRECTORY) {
radCreateDirectory(gameFilePath);
}
gameFilePath += m_strName.GetBuffer();
gameFilePath += ".game";
Sys_Printf( "game file: %s\n", gameFilePath.GetBuffer() );
Expand Down Expand Up @@ -3441,6 +3444,12 @@ void CGameInstall::Run() {
source += "/install/";
Str dest = m_strEngine.GetBuffer();
CopyTree( source.GetBuffer(), dest.GetBuffer() );
// Hardcoded fix for "missing" shaderlist in gamepack
dest += "/baseq3/scripts/shaderlist.txt";
if(CheckFile(dest.GetBuffer()) != PATH_FILE) {
source += "baseq3/scripts/default_shaderlist.txt";
radCopyFile(source.GetBuffer(),dest.GetBuffer());
}
fprintf( fg, " basegame=\"baseq3\"\n" );
break;
}
Expand Down

0 comments on commit 686a211

Please sign in to comment.