diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-05-19 22:17:28 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-05-19 22:17:28 +0200 |
commit | 4008af692556ffb0f819c9a570267ffbaa871cad (patch) | |
tree | c52c64411b58824eb16735cfd72965bb33e3d6d1 | |
parent | cCompositeChat message type is now formatted (diff) | |
download | cuberite-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 |
-rw-r--r-- | src/Entities/Entity.cpp | 4 |
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))) ) { |