From 0018df2cfced58ce7ec7c353043f27440d6090fa Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Fri, 14 Apr 2006 20:35:47 +0000 Subject: [PATCH] * Output botlib.log in a sensible place (from Erik Auerswald) --- code/botlib/be_interface.c | 4 +++- code/game/ai_main.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/code/botlib/be_interface.c b/code/botlib/be_interface.c index d0585731..b6862af2 100644 --- a/code/botlib/be_interface.c +++ b/code/botlib/be_interface.c @@ -136,12 +136,14 @@ qboolean BotLibSetup(char *str) int Export_BotLibSetup(void) { int errnum; + char logfilename[MAX_QPATH]; bot_developer = LibVarGetValue("bot_developer"); memset( &botlibglobals, 0, sizeof(botlibglobals) ); // bk001207 - init //initialize byte swapping (litte endian etc.) // Swap_Init(); - Log_Open("botlib.log"); + Com_sprintf(logfilename, sizeof(logfilename), "%s%cbotlib.log", LibVarGetString("homedir"), PATH_SEP); + Log_Open(logfilename); // botimport.Print(PRT_MESSAGE, "------- BotLib Initialization -------\n"); // diff --git a/code/game/ai_main.c b/code/game/ai_main.c index c032bcdd..f67af0eb 100644 --- a/code/game/ai_main.c +++ b/code/game/ai_main.c @@ -1628,6 +1628,9 @@ int BotInitLibrary(void) { //cd directory trap_Cvar_VariableStringBuffer("fs_cdpath", buf, sizeof(buf)); if (strlen(buf)) trap_BotLibVarSet("cddir", buf); + //home directory + trap_Cvar_VariableStringBuffer("fs_homepath", buf, sizeof(buf)); + if (strlen(buf)) trap_BotLibVarSet("homedir", buf); // #ifdef MISSIONPACK trap_BotLibDefine("MISSIONPACK");