aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-10-17 22:35:45 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-10-17 22:35:45 +0000
commite2a01ec6b501b97b313bec7bb24a67a42d035f50 (patch)
treede8b4a0ba59f3e3e15c82376eb2380fe3bdd0fde /code
parent522941febb1d96a7e347af6d9bab893b51e2f606 (diff)
downloadioquake3-aero-e2a01ec6b501b97b313bec7bb24a67a42d035f50.tar.gz
ioquake3-aero-e2a01ec6b501b97b313bec7bb24a67a42d035f50.zip
Only create botlib.log if in bot developer mode.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1676 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r--code/botlib/be_interface.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/code/botlib/be_interface.c b/code/botlib/be_interface.c
index 1e0e802..3f57df5 100644
--- a/code/botlib/be_interface.c
+++ b/code/botlib/be_interface.c
@@ -136,29 +136,35 @@ qboolean BotLibSetup(char *str)
int Export_BotLibSetup(void)
{
int errnum;
- char logfilename[MAX_OSPATH];
- char *homedir, *gamedir;
botDeveloper = LibVarGetValue("bot_developer");
memset( &botlibglobals, 0, sizeof(botlibglobals) );
//initialize byte swapping (litte endian etc.)
// Swap_Init();
- homedir = LibVarGetString("homedir");
- gamedir = LibVarGetString("gamedir");
- if (homedir[0]) {
- if (gamedir[0]) {
- Com_sprintf(logfilename, sizeof(logfilename), "%s%c%s%cbotlib.log", homedir, PATH_SEP, gamedir, PATH_SEP);
- }
- else {
- Com_sprintf(logfilename, sizeof(logfilename), "%s%c" BASEGAME "%cbotlib.log", homedir, PATH_SEP, PATH_SEP);
+
+ if(botDeveloper)
+ {
+ char *homedir, *gamedir;
+ char logfilename[MAX_OSPATH];
+
+ homedir = LibVarGetString("homedir");
+ gamedir = LibVarGetString("gamedir");
+
+ if (*homedir)
+ {
+ if(*gamedir)
+ Com_sprintf(logfilename, sizeof(logfilename), "%s%c%s%cbotlib.log", homedir, PATH_SEP, gamedir, PATH_SEP);
+ else
+ Com_sprintf(logfilename, sizeof(logfilename), "%s%c" BASEGAME "%cbotlib.log", homedir, PATH_SEP, PATH_SEP);
}
- } else {
- Com_sprintf(logfilename, sizeof(logfilename), "botlib.log");
+ else
+ Com_sprintf(logfilename, sizeof(logfilename), "botlib.log");
+
+ Log_Open(logfilename);
}
- Log_Open(logfilename);
- //
+
botimport.Print(PRT_MESSAGE, "------- BotLib Initialization -------\n");
- //
+
botlibglobals.maxclients = (int) LibVarValue("maxclients", "128");
botlibglobals.maxentities = (int) LibVarValue("maxentities", "1024");