mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Ensure air neighbors to liquids that can flow are enqueued for transformation
This commit is contained in:
parent
7024b45197
commit
d0711821f3
1 changed files with 7 additions and 1 deletions
|
@ -1629,9 +1629,15 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
|
||||||
case LIQUID_NONE:
|
case LIQUID_NONE:
|
||||||
if (nb.n.getContent() == CONTENT_AIR) {
|
if (nb.n.getContent() == CONTENT_AIR) {
|
||||||
airs[num_airs++] = nb;
|
airs[num_airs++] = nb;
|
||||||
|
// if the current node is a water source the neighbor
|
||||||
|
// should be enqueded for transformation regardless of whether the
|
||||||
|
// current node changes or not.
|
||||||
|
if (nb.t != NEIGHBOR_UPPER && liquid_type != LIQUID_NONE)
|
||||||
|
m_transforming_liquid.push_back(npos);
|
||||||
// if the current node happens to be a flowing node, it will start to flow down here.
|
// if the current node happens to be a flowing node, it will start to flow down here.
|
||||||
if (nb.t == NEIGHBOR_LOWER)
|
if (nb.t == NEIGHBOR_LOWER) {
|
||||||
flowing_down = true;
|
flowing_down = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
neutrals[num_neutrals++] = nb;
|
neutrals[num_neutrals++] = nb;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue