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:
parent
8d387433b1
commit
11aab4198b
2 changed files with 52 additions and 21 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue