Skip to content

Commit

Permalink
Liquid flow: Prevent water spreading on ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat committed Jan 20, 2016
1 parent 882a89d commit 0459eca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1732,11 +1732,14 @@ void Map::transformLiquids(std::map<v3s16, MapBlock*> & modified_blocks)
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 (nb.t == NEIGHBOR_LOWER) {
if (nb.t == NEIGHBOR_LOWER)
flowing_down = true;
}
} else {
neutrals[num_neutrals++] = nb;
// If neutral below is ignore prevent water spreading outwards
if (nb.t == NEIGHBOR_LOWER &&
nb.n.getContent() == CONTENT_IGNORE)
flowing_down = true;
}
break;
case LIQUID_SOURCE:
Expand Down

0 comments on commit 0459eca

Please sign in to comment.