mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-27 22:42:09 +00:00
Give botlib com_basegame for botlib.log path
Before it always used BASEGAME fallback code.
This commit is contained in:
parent
b95d8a91aa
commit
feb012152c
3 changed files with 10 additions and 7 deletions
|
@ -144,19 +144,19 @@ int Export_BotLibSetup(void)
|
||||||
|
|
||||||
if(botDeveloper)
|
if(botDeveloper)
|
||||||
{
|
{
|
||||||
char *homedir, *gamedir, *basedir;
|
char *homedir, *gamedir, *basegame;
|
||||||
char logfilename[MAX_OSPATH];
|
char logfilename[MAX_OSPATH];
|
||||||
|
|
||||||
homedir = LibVarGetString("homedir");
|
homedir = LibVarGetString("homedir");
|
||||||
gamedir = LibVarGetString("gamedir");
|
gamedir = LibVarGetString("gamedir");
|
||||||
basedir = LibVarGetString("com_basegame");
|
basegame = LibVarGetString("basegame");
|
||||||
|
|
||||||
if (*homedir)
|
if (*homedir)
|
||||||
{
|
{
|
||||||
if(*gamedir)
|
if(*gamedir)
|
||||||
Com_sprintf(logfilename, sizeof(logfilename), "%s%c%s%cbotlib.log", homedir, PATH_SEP, gamedir, PATH_SEP);
|
Com_sprintf(logfilename, sizeof(logfilename), "%s%c%s%cbotlib.log", homedir, PATH_SEP, gamedir, PATH_SEP);
|
||||||
else if(*basedir)
|
else if(*basegame)
|
||||||
Com_sprintf(logfilename, sizeof(logfilename), "%s%c%s%cbotlib.log", homedir, PATH_SEP, basedir, PATH_SEP);
|
Com_sprintf(logfilename, sizeof(logfilename), "%s%c%s%cbotlib.log", homedir, PATH_SEP, basegame, PATH_SEP);
|
||||||
else
|
else
|
||||||
Com_sprintf(logfilename, sizeof(logfilename), "%s%c" BASEGAME "%cbotlib.log", homedir, PATH_SEP, PATH_SEP);
|
Com_sprintf(logfilename, sizeof(logfilename), "%s%c" BASEGAME "%cbotlib.log", homedir, PATH_SEP, PATH_SEP);
|
||||||
}
|
}
|
||||||
|
|
|
@ -437,9 +437,10 @@ botlib_export_t *GetBotLibAPI( int apiVersion, botlib_import_t *import );
|
||||||
|
|
||||||
name: default: module(s): description:
|
name: default: module(s): description:
|
||||||
|
|
||||||
"basedir" "" l_utils.c base directory
|
"basedir" "" - base directory
|
||||||
"gamedir" "" l_utils.c game directory
|
"homedir" "" be_interface.c home directory
|
||||||
"cddir" "" l_utils.c CD directory
|
"gamedir" "" be_interface.c mod game directory
|
||||||
|
"basegame" "" be_interface.c base game directory
|
||||||
|
|
||||||
"log" "0" l_log.c enable/disable creating a log file
|
"log" "0" l_log.c enable/disable creating a log file
|
||||||
"maxclients" "4" be_interface.c maximum number of clients
|
"maxclients" "4" be_interface.c maximum number of clients
|
||||||
|
|
|
@ -451,6 +451,8 @@ int SV_BotLibSetup( void ) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
botlib_export->BotLibVarSet( "basegame", com_basegame->string );
|
||||||
|
|
||||||
return botlib_export->BotLibSetup();
|
return botlib_export->BotLibSetup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue