Change how class tables are created and recreated for greater robustness
This commit is contained in:
@@ -60,9 +60,6 @@ World::World(WorldType wt) {
|
||||
LS.getglobaltable(globtab);
|
||||
LS.settabletype(globtab, LUA_TT_GLOBALENV);
|
||||
|
||||
// Create the tangibles table in the registry.
|
||||
LS.rawset(LuaRegistry, "tangibles", LuaNewTable);
|
||||
|
||||
// Store the world type in the registry.
|
||||
LS.rawset(LuaRegistry, "worldtype", wt);
|
||||
|
||||
@@ -592,7 +589,7 @@ void World::invoke_flush_prints(int64_t actor_id, int64_t place_id, const eng::s
|
||||
void World::invoke_lua(int64_t actor_id, int64_t place_id, const eng::string &action, const InvocationData &data) {
|
||||
assert(stack_is_clear());
|
||||
|
||||
// Make sure that actor and place exist.
|
||||
// Make sure that actor and place exist and are not stubs.
|
||||
Tangible *tactor = tangible_get(actor_id);
|
||||
Tangible *tplace = tangible_get(place_id);
|
||||
if ((tactor == nullptr) || (tplace == nullptr)) {
|
||||
|
||||
Reference in New Issue
Block a user