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);
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;