summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-19 22:17:28 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-19 22:17:28 +0200
commit4008af692556ffb0f819c9a570267ffbaa871cad (patch)
treec52c64411b58824eb16735cfd72965bb33e3d6d1 /src/Entities
parentcCompositeChat message type is now formatted (diff)
downloadcuberite-4008af692556ffb0f819c9a570267ffbaa871cad.tar
cuberite-4008af692556ffb0f819c9a570267ffbaa871cad.tar.gz
cuberite-4008af692556ffb0f819c9a570267ffbaa871cad.tar.bz2
cuberite-4008af692556ffb0f819c9a570267ffbaa871cad.tar.lz
cuberite-4008af692556ffb0f819c9a570267ffbaa871cad.tar.xz
cuberite-4008af692556ffb0f819c9a570267ffbaa871cad.tar.zst
cuberite-4008af692556ffb0f819c9a570267ffbaa871cad.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/Entity.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 15f456332..ed06e76b9 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -1024,9 +1024,9 @@ void cEntity::DetectCacti()
float w = m_Width / 2;
if (
(((X + 1) - GetPosX() < w) && (GetWorld()->GetBlock(X + 1, Y, Z) == E_BLOCK_CACTUS)) ||
- (((GetPosX() - (X - 1)) - 1 < w) && (GetWorld()->GetBlock(X - 1, Y, Z) == E_BLOCK_CACTUS)) ||
+ ((GetPosX() - X < w) && (GetWorld()->GetBlock(X - 1, Y, Z) == E_BLOCK_CACTUS)) ||
(((Z + 1) - GetPosZ() < w) && (GetWorld()->GetBlock(X, Y, Z + 1) == E_BLOCK_CACTUS)) ||
- (((GetPosZ() - (Z - 1)) - 1 < w) && (GetWorld()->GetBlock(X, Y, Z - 1) == E_BLOCK_CACTUS)) ||
+ ((GetPosZ() - Z < w) && (GetWorld()->GetBlock(X, Y, Z - 1) == E_BLOCK_CACTUS)) ||
(((Y > 0) && (Y < cChunkDef::Height)) && ((GetPosY() - Y < 1) && (GetWorld()->GetBlock(X, Y, Z) == E_BLOCK_CACTUS)))
)
{