mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 05:01:40 +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)
|
||||
{
|
||||
char *homedir, *gamedir, *basedir;
|
||||
char *homedir, *gamedir, *basegame;
|
||||
char logfilename[MAX_OSPATH];
|
||||
|
||||
homedir = LibVarGetString("homedir");
|
||||
gamedir = LibVarGetString("gamedir");
|
||||
basedir = LibVarGetString("com_basegame");
|
||||
basegame = LibVarGetString("basegame");
|
||||
|
||||
if (*homedir)
|
||||
{
|
||||
if(*gamedir)
|
||||
Com_sprintf(logfilename, sizeof(logfilename), "%s%c%s%cbotlib.log", homedir, PATH_SEP, gamedir, PATH_SEP);
|
||||
else if(*basedir)
|
||||
Com_sprintf(logfilename, sizeof(logfilename), "%s%c%s%cbotlib.log", homedir, PATH_SEP, basedir, PATH_SEP);
|
||||
else if(*basegame)
|
||||
Com_sprintf(logfilename, sizeof(logfilename), "%s%c%s%cbotlib.log", homedir, PATH_SEP, basegame, PATH_SEP);
|
||||
else
|
||||
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:
|
||||
|
||||
"basedir" "" l_utils.c base directory
|
||||
"gamedir" "" l_utils.c game directory
|
||||
"cddir" "" l_utils.c CD directory
|
||||
"basedir" "" - base directory
|
||||
"homedir" "" be_interface.c home 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
|
||||
"maxclients" "4" be_interface.c maximum number of clients
|
||||
|
|
|
@ -451,6 +451,8 @@ int SV_BotLibSetup( void ) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
botlib_export->BotLibVarSet( "basegame", com_basegame->string );
|
||||
|
||||
return botlib_export->BotLibSetup();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue