A little cleanup, and some work on LpxClient

This commit is contained in:
2021-10-15 13:51:32 -04:00
parent 2e05df7ac5
commit b7b4ad8577
7 changed files with 46 additions and 21 deletions

View File

@@ -161,7 +161,7 @@ Tangible *World::tangible_make(lua_State *L, int64_t id, const std::string &plan
LuaStack LS(L, tangibles, database, metatab);
// Create the C++ part of the structure.
std::unique_ptr<Tangible> &t = tangibles_[id];
UniqueTangible &t = tangibles_[id];
assert (t == nullptr);
t.reset(new Tangible(this, id));
@@ -564,7 +564,7 @@ void World::deserialize(StreamBuffer *sb) {
size_t ntan = sb->read_uint32();
for (size_t i = 0; i < ntan; i++) {
int64_t id = sb->read_int64();
std::unique_ptr<Tangible> &t = tangibles_[id];
UniqueTangible &t = tangibles_[id];
if (t == nullptr) {
t.reset(new Tangible(this, id));
} else {