mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Cache liquid alternative IDs (#8053)
This commit is contained in:
parent
42fcfb75e8
commit
82e4137893
6 changed files with 38 additions and 16 deletions
|
@ -405,8 +405,8 @@ void MapblockMeshGenerator::prepareLiquidNodeDrawing()
|
|||
|
||||
MapNode ntop = data->m_vmanip.getNodeNoEx(blockpos_nodes + v3s16(p.X, p.Y + 1, p.Z));
|
||||
MapNode nbottom = data->m_vmanip.getNodeNoEx(blockpos_nodes + v3s16(p.X, p.Y - 1, p.Z));
|
||||
c_flowing = nodedef->getId(f->liquid_alternative_flowing);
|
||||
c_source = nodedef->getId(f->liquid_alternative_source);
|
||||
c_flowing = f->liquid_alternative_flowing_id;
|
||||
c_source = f->liquid_alternative_source_id;
|
||||
top_is_same_liquid = (ntop.getContent() == c_flowing) || (ntop.getContent() == c_source);
|
||||
draw_liquid_bottom = (nbottom.getContent() != c_flowing) && (nbottom.getContent() != c_source);
|
||||
if (draw_liquid_bottom) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue