mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Fix liquid drawtype faces sometimes not rendering (#12807)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
This commit is contained in:
parent
f4a01f3a5d
commit
3f801bc096
3 changed files with 14 additions and 7 deletions
|
@ -493,9 +493,16 @@ struct ContentFeatures
|
|||
bool isLiquid() const{
|
||||
return (liquid_type != LIQUID_NONE);
|
||||
}
|
||||
bool sameLiquid(const ContentFeatures &f) const{
|
||||
if(!isLiquid() || !f.isLiquid()) return false;
|
||||
return (liquid_alternative_flowing_id == f.liquid_alternative_flowing_id);
|
||||
|
||||
bool isLiquidRender() const {
|
||||
return (drawtype == NDT_LIQUID || drawtype == NDT_FLOWINGLIQUID);
|
||||
}
|
||||
|
||||
bool sameLiquidRender(const ContentFeatures &f) const {
|
||||
if (!isLiquidRender() || !f.isLiquidRender())
|
||||
return false;
|
||||
return liquid_alternative_flowing_id == f.liquid_alternative_flowing_id &&
|
||||
liquid_alternative_source_id == f.liquid_alternative_source_id;
|
||||
}
|
||||
|
||||
bool lightingEquivalent(const ContentFeatures &other) const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue