1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);