1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-16 01:45:36 +02:00

Optimize swapping nodes with equivalent lighting

This commit is contained in:
Jude Melton-Houghton
2022-03-29 12:06:44 -04:00
committed by GitHub
parent 8d387433b1
commit 11aab4198b
2 changed files with 52 additions and 21 deletions

View File

@@ -478,6 +478,12 @@ struct ContentFeatures
return (liquid_alternative_flowing_id == f.liquid_alternative_flowing_id);
}
bool lightingEquivalent(const ContentFeatures &other) const {
return light_propagates == other.light_propagates
&& sunlight_propagates == other.sunlight_propagates
&& light_source == other.light_source;
}
int getGroup(const std::string &group) const
{
return itemgroup_get(groups, group);