Consolidate special path functions into m_specialpaths.cpp

- Also remove CDROM_DIR while I'm at it.
This commit is contained in:
Randy Heit 2013-09-14 21:02:47 -05:00
commit da02a44126
11 changed files with 541 additions and 299 deletions

View file

@ -505,31 +505,13 @@ bool FCajunMaster::LoadBots ()
bool gotteam = false;
bglobal.ForgetBots ();
#ifndef __unix__
tmp = progdir;
tmp += "zcajun/" BOTFILENAME;
if (!FileExists (tmp))
tmp = M_GetCajunPath(BOTFILENAME);
if (tmp.IsEmpty())
{
DPrintf ("No " BOTFILENAME ", so no bots\n");
return false;
}
#else
tmp = GetUserFile (BOTFILENAME);
if (!FileExists (tmp))
{
if (!FileExists (SHARE_DIR BOTFILENAME))
{
DPrintf ("No " BOTFILENAME ", so no bots\n");
return false;
}
else
sc.OpenFile (SHARE_DIR BOTFILENAME);
}
#endif
else
{
sc.OpenFile (tmp);
}
sc.OpenFile(tmp);
while (sc.GetString ())
{