Add donotpredict to global(x)
This commit is contained in:
@@ -11,7 +11,7 @@ LuaDefine(global, "globalname", "get a table where global data can be stored") {
|
|||||||
// Get a pointer to the globaldb.
|
// Get a pointer to the globaldb.
|
||||||
LS.rawget(globaldb, LuaRegistry, "globaldb");
|
LS.rawget(globaldb, LuaRegistry, "globaldb");
|
||||||
if (!LS.istable(globaldb)) {
|
if (!LS.istable(globaldb)) {
|
||||||
luaL_error(L, "globaldb is not enabled");
|
return lua_yield(L, 0); // donotpredict
|
||||||
}
|
}
|
||||||
|
|
||||||
LS.checkstring(globalname);
|
LS.checkstring(globalname);
|
||||||
|
|||||||
@@ -62,7 +62,9 @@ World::World(util::WorldType wt) {
|
|||||||
LS.rawset(LuaRegistry, "tangibles", LuaNewTable);
|
LS.rawset(LuaRegistry, "tangibles", LuaNewTable);
|
||||||
|
|
||||||
// Create the globaldb in the registry.
|
// Create the globaldb in the registry.
|
||||||
LS.rawset(LuaRegistry, "globaldb", LuaNewTable);
|
if (util::world_type_authoritative(wt)) {
|
||||||
|
LS.rawset(LuaRegistry, "globaldb", LuaNewTable);
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize the SourceDB. At this stage, the sourcedb is
|
// Initialize the SourceDB. At this stage, the sourcedb is
|
||||||
// empty, so it's just populating the lua builtins.
|
// empty, so it's just populating the lua builtins.
|
||||||
|
|||||||
Reference in New Issue
Block a user