From 075e39d5827e492b0823df50803a80956965b9d5 Mon Sep 17 00:00:00 2001 From: Christian Ratzenhofer Date: Mon, 26 Mar 2012 12:12:28 +0200 Subject: [PATCH] Check if games folder exists, and copy shaderlist for Q3 if missing --- radiant/preferences.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 3a43c35a2..430c751fa 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -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() ); @@ -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; }