forked from github/server
guessing the name of the order file if it isn't specified.
This commit is contained in:
parent
37143411e1
commit
80e445fe96
|
@ -108,9 +108,10 @@
|
||||||
/* libc includes */
|
/* libc includes */
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
#include <climits>
|
||||||
|
#include <clocale>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <clocale>
|
|
||||||
|
|
||||||
#if defined(USE_DMALLOC)
|
#if defined(USE_DMALLOC)
|
||||||
# define CLEANUP_CODE
|
# define CLEANUP_CODE
|
||||||
|
@ -537,6 +538,12 @@ read_args(int argc, char **argv, lua_State * luaState)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (orders==NULL) {
|
||||||
|
static char orderfile[MAX_PATH];
|
||||||
|
sprintf(orderfile, "%s/orders.%d", basepath(), turn);
|
||||||
|
orders = orderfile;
|
||||||
|
}
|
||||||
|
|
||||||
/* add some more variables to the lua globals */
|
/* add some more variables to the lua globals */
|
||||||
setLuaString(luaState, "datapath", datapath());
|
setLuaString(luaState, "datapath", datapath());
|
||||||
setLuaString(luaState, "scriptpath", script_path);
|
setLuaString(luaState, "scriptpath", script_path);
|
||||||
|
|
Loading…
Reference in New Issue