Browse Source

Handle multiple deserialization of a block's entities

Port of Old MT commit a067d40454
From: Rogier <rogier777@gmail.com>
Date: Sun, 11 Dec 2016 18:47:50 +0100
master
OldCoder 3 months ago
parent
commit
b11ac4eac6
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      src/staticobject.cpp

+ 9
- 0
src/staticobject.cpp View File

@@ -75,6 +75,15 @@ void StaticObjectList::serialize(std::ostream &os)
}
void StaticObjectList::deSerialize(std::istream &is)
{
if (m_active.size()) {
errorstream << "StaticObjectList::deSerialize(): "
<< "deserializing objects while " << m_active.size()
<< " active objects already exist (not cleared). "
<< m_stored.size() << " stored objects _were_ cleared"
<< std::endl;
}
m_stored.clear();

// version
u8 version = readU8(is);
// count

Loading…
Cancel
Save