aboutsummaryrefslogtreecommitdiff
path: root/src/reflowscan.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/reflowscan.cpp')
-rw-r--r--src/reflowscan.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/reflowscan.cpp b/src/reflowscan.cpp
index 9d5c965d8..e9419234f 100644
--- a/src/reflowscan.cpp
+++ b/src/reflowscan.cpp
@@ -85,13 +85,12 @@ inline MapBlock *ReflowScan::lookupBlock(int x, int y, int z)
inline bool ReflowScan::isLiquidFlowableTo(int x, int y, int z)
{
// Tests whether (x,y,z) is a node to which liquid might flow.
- bool valid_position;
MapBlock *block = lookupBlock(x, y, z);
if (block) {
int dx = (MAP_BLOCKSIZE + x) % MAP_BLOCKSIZE;
int dy = (MAP_BLOCKSIZE + y) % MAP_BLOCKSIZE;
int dz = (MAP_BLOCKSIZE + z) % MAP_BLOCKSIZE;
- MapNode node = block->getNodeNoCheck(dx, dy, dz, &valid_position);
+ MapNode node = block->getNodeNoCheck(dx, dy, dz);
if (node.getContent() != CONTENT_IGNORE) {
const ContentFeatures &f = m_ndef->get(node);
// NOTE: No need to check for flowing nodes with lower liquid level
@@ -115,8 +114,6 @@ inline bool ReflowScan::isLiquidHorizontallyFlowable(int x, int y, int z)
void ReflowScan::scanColumn(int x, int z)
{
- bool valid_position;
-
// Is the column inside a loaded block?
MapBlock *block = lookupBlock(x, 0, z);
if (!block)
@@ -129,7 +126,7 @@ void ReflowScan::scanColumn(int x, int z)
// Get the state from the node above the scanned block
bool was_ignore, was_liquid;
if (above) {
- MapNode node = above->getNodeNoCheck(dx, 0, dz, &valid_position);
+ MapNode node = above->getNodeNoCheck(dx, 0, dz);
was_ignore = node.getContent() == CONTENT_IGNORE;
was_liquid = m_ndef->get(node).isLiquid();
} else {
@@ -141,7 +138,7 @@ void ReflowScan::scanColumn(int x, int z)
// Scan through the whole block
for (s16 y = MAP_BLOCKSIZE - 1; y >= 0; y--) {
- MapNode node = block->getNodeNoCheck(dx, y, dz, &valid_position);
+ MapNode node = block->getNodeNoCheck(dx, y, dz);
const ContentFeatures &f = m_ndef->get(node);
bool is_ignore = node.getContent() == CONTENT_IGNORE;
bool is_liquid = f.isLiquid();
@@ -179,7 +176,7 @@ void ReflowScan::scanColumn(int x, int z)
// Check the node below the current block
MapBlock *below = lookupBlock(x, -1, z);
if (below) {
- MapNode node = below->getNodeNoCheck(dx, MAP_BLOCKSIZE - 1, dz, &valid_position);
+ MapNode node = below->getNodeNoCheck(dx, MAP_BLOCKSIZE - 1, dz);
const ContentFeatures &f = m_ndef->get(node);
bool is_ignore = node.getContent() == CONTENT_IGNORE;
bool is_liquid = f.isLiquid();