1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Check for falling float nodes in liquid transform (#12862)

This commit is contained in:
Jude Melton-Houghton 2022-10-18 18:03:05 -04:00 committed by GitHub
parent b38ffdec27
commit dafdb3edb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 35 additions and 1 deletions

View file

@ -1393,6 +1393,7 @@ content_t NodeDefManager::set(const std::string &name, const ContentFeatures &de
eraseIdFromGroups(id);
m_content_features[id] = def;
m_content_features[id].floats = itemgroup_get(def.groups, "float") != 0;
m_content_lighting_flag_cache[id] = def.getLightingFlags();
verbosestream << "NodeDefManager: registering content id \"" << id
<< "\": name=\"" << def.name << "\""<<std::endl;
@ -1606,6 +1607,7 @@ void NodeDefManager::deSerialize(std::istream &is, u16 protocol_version)
if (i >= m_content_features.size())
m_content_features.resize((u32)(i) + 1);
m_content_features[i] = f;
m_content_features[i].floats = itemgroup_get(f.groups, "float") != 0;
m_content_lighting_flag_cache[i] = f.getLightingFlags();
addNameIdMapping(i, f.name);
TRACESTREAM(<< "NodeDef: deserialized " << f.name << std::endl);