summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockPlant.h
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2015-09-17 14:32:01 +0200
committerworktycho <work.tycho@gmail.com>2015-09-17 14:32:01 +0200
commit2598f3158f0f47c5e082851032bf4a1a3b8d88e5 (patch)
tree4b984cbc73628fac3a3e0ed3aff55a65dfaf82f7 /src/Blocks/BlockPlant.h
parentMerge pull request #2457 from cuberite/log (diff)
parentAdded CircleCI for stylechecking. (diff)
downloadcuberite-2598f3158f0f47c5e082851032bf4a1a3b8d88e5.tar
cuberite-2598f3158f0f47c5e082851032bf4a1a3b8d88e5.tar.gz
cuberite-2598f3158f0f47c5e082851032bf4a1a3b8d88e5.tar.bz2
cuberite-2598f3158f0f47c5e082851032bf4a1a3b8d88e5.tar.lz
cuberite-2598f3158f0f47c5e082851032bf4a1a3b8d88e5.tar.xz
cuberite-2598f3158f0f47c5e082851032bf4a1a3b8d88e5.tar.zst
cuberite-2598f3158f0f47c5e082851032bf4a1a3b8d88e5.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockPlant.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Blocks/BlockPlant.h b/src/Blocks/BlockPlant.h
index 0e6aca7eb..0155dc466 100644
--- a/src/Blocks/BlockPlant.h
+++ b/src/Blocks/BlockPlant.h
@@ -49,13 +49,12 @@ protected:
Light = Blocklight;
}
- // Return true if there is enough light
- // Set m_ShouldDie if the base light amounts are not enough to sustain a plant
+ // Based on light levels, decide between growth, stay and death:
if (Light > 8)
{
return paGrowth;
}
- else if (Blocklight < 9 && SkyLight < 9)
+ else if ((Blocklight < 9) && (SkyLight < 9))
{
return paDeath;
}