]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/environment.cpp
256 surfaceparms
[xonotic/netradiant.git] / radiant / environment.cpp
index 58a405dd3485f12a27d26af3d51af217f0bd1a50..040335794d339fd627ce91c0924e804243883823 100644 (file)
@@ -88,10 +88,13 @@ bool gamedetect_check_game(char *gamefile, const char *checkfile1, const char *c
        if(!file_exists(buf))
                return false;
 
-       strcpy(buf + bufpos + 1, checkfile2);
-       globalOutputStream() << "Checking for a game file in " << buf << "\n";
-       if(!file_exists(buf))
-               return false;
+       if(checkfile2)
+       {
+               strcpy(buf + bufpos + 1, checkfile2);
+               globalOutputStream() << "Checking for a game file in " << buf << "\n";
+               if(!file_exists(buf))
+                       return false;
+       }
 
        buf[bufpos + 1] = 0;
        gamedetect_found_game(gamefile, buf);
@@ -138,6 +141,10 @@ void gamedetect()
          if(gamedetect_check_game("q2w.game", "default/quake2world.version", NULL, buf, p - buf))
            return;
 
+         // try to detect Warsow installs
+         if(gamedetect_check_game("warsow.game", "basewsw/dedicated_autoexec.cfg", NULL, buf, p - buf))
+           return;
+
          // we found nothing
          // go backwards
          --p;