forked from github/server
- Lua vm state in global variable
This commit is contained in:
parent
476788755b
commit
7a6935daf7
|
@ -1157,14 +1157,15 @@ extern const struct race * new_race[];
|
||||||
|
|
||||||
/* globale settings des Spieles */
|
/* globale settings des Spieles */
|
||||||
typedef struct settings {
|
typedef struct settings {
|
||||||
const char *gamename;
|
const char *gamename;
|
||||||
const char *welcomepath;
|
const char *welcomepath;
|
||||||
unsigned int maxunits;
|
unsigned int maxunits;
|
||||||
struct attrib *attribs;
|
struct attrib *attribs;
|
||||||
unsigned int data_version;
|
unsigned int data_version;
|
||||||
unsigned int data_turn;
|
unsigned int data_turn;
|
||||||
boolean disabled[MAXKEYWORDS];
|
boolean disabled[MAXKEYWORDS];
|
||||||
struct param * parameters;
|
struct param * parameters;
|
||||||
|
void * vm_state;
|
||||||
} settings;
|
} settings;
|
||||||
extern settings global;
|
extern settings global;
|
||||||
|
|
||||||
|
|
|
@ -645,6 +645,7 @@ main(int argc, char *argv[])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lua_State * luaState = lua_init();
|
lua_State * luaState = lua_init();
|
||||||
|
global.vm_state = luaState;
|
||||||
if ((i=read_args(argc, argv, luaState))!=0) return i;
|
if ((i=read_args(argc, argv, luaState))!=0) return i;
|
||||||
|
|
||||||
strcat(strcpy(zText, resourcepath()), "/timestrings");
|
strcat(strcpy(zText, resourcepath()), "/timestrings");
|
||||||
|
|
Loading…
Reference in New Issue