* Output botlib.log in a sensible place (from Erik Auerswald)
This commit is contained in:
parent
131fb9933f
commit
0018df2cfc
2 changed files with 6 additions and 1 deletions
|
@ -136,12 +136,14 @@ qboolean BotLibSetup(char *str)
|
||||||
int Export_BotLibSetup(void)
|
int Export_BotLibSetup(void)
|
||||||
{
|
{
|
||||||
int errnum;
|
int errnum;
|
||||||
|
char logfilename[MAX_QPATH];
|
||||||
|
|
||||||
bot_developer = LibVarGetValue("bot_developer");
|
bot_developer = LibVarGetValue("bot_developer");
|
||||||
memset( &botlibglobals, 0, sizeof(botlibglobals) ); // bk001207 - init
|
memset( &botlibglobals, 0, sizeof(botlibglobals) ); // bk001207 - init
|
||||||
//initialize byte swapping (litte endian etc.)
|
//initialize byte swapping (litte endian etc.)
|
||||||
// Swap_Init();
|
// 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");
|
botimport.Print(PRT_MESSAGE, "------- BotLib Initialization -------\n");
|
||||||
//
|
//
|
||||||
|
|
|
@ -1628,6 +1628,9 @@ int BotInitLibrary(void) {
|
||||||
//cd directory
|
//cd directory
|
||||||
trap_Cvar_VariableStringBuffer("fs_cdpath", buf, sizeof(buf));
|
trap_Cvar_VariableStringBuffer("fs_cdpath", buf, sizeof(buf));
|
||||||
if (strlen(buf)) trap_BotLibVarSet("cddir", 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
|
#ifdef MISSIONPACK
|
||||||
trap_BotLibDefine("MISSIONPACK");
|
trap_BotLibDefine("MISSIONPACK");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue