summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2014-05-19 08:31:53 +0200
committerAlexander Harkness <bearbin@gmail.com>2014-05-19 08:31:53 +0200
commit70cf4a5eafaf91f9b6d0b71f607270b7df86e6d9 (patch)
tree7cf7006b2b0dcdbea2dae74cd8316e15da8218c2
parentImplemented cacti damage (diff)
downloadcuberite-70cf4a5eafaf91f9b6d0b71f607270b7df86e6d9.tar
cuberite-70cf4a5eafaf91f9b6d0b71f607270b7df86e6d9.tar.gz
cuberite-70cf4a5eafaf91f9b6d0b71f607270b7df86e6d9.tar.bz2
cuberite-70cf4a5eafaf91f9b6d0b71f607270b7df86e6d9.tar.lz
cuberite-70cf4a5eafaf91f9b6d0b71f607270b7df86e6d9.tar.xz
cuberite-70cf4a5eafaf91f9b6d0b71f607270b7df86e6d9.tar.zst
cuberite-70cf4a5eafaf91f9b6d0b71f607270b7df86e6d9.zip
-rw-r--r--src/Entities/Entity.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index b7cb2c3d9..1a91639ac 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -1006,14 +1006,14 @@ void cEntity::DetectCacti()
{
int X = POSX_TOINT, Y = POSY_TOINT, Z = POSZ_TOINT;
if (
- ((X + 1) - GetPosX() < 0.3) && (GetWorld()->GetBlock(X + 1, Y, Z) == E_BLOCK_CACTUS) ||
- ((GetPosX() - (X - 1)) - 1 < 0.3) && (GetWorld()->GetBlock(X - 1, Y, Z) == E_BLOCK_CACTUS) ||
- ((Z + 1) - GetPosZ() < 0.3) && (GetWorld()->GetBlock(X, Y, Z + 1) == E_BLOCK_CACTUS) ||
- ((GetPosZ() - (Z - 1)) - 1 < 0.3) && (GetWorld()->GetBlock(X, Y, Z - 1) == E_BLOCK_CACTUS) ||
+ (((X + 1) - GetPosX() < 0.3) && (GetWorld()->GetBlock(X + 1, Y, Z) == E_BLOCK_CACTUS)) ||
+ (((GetPosX() - (X - 1)) - 1 < 0.3) && (GetWorld()->GetBlock(X - 1, Y, Z) == E_BLOCK_CACTUS)) ||
+ (((Z + 1) - GetPosZ() < 0.3) && (GetWorld()->GetBlock(X, Y, Z + 1) == E_BLOCK_CACTUS)) ||
+ (((GetPosZ() - (Z - 1)) - 1 < 0.3) && (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)))
)
{
- TakeDamage(dtCactus, NULL, 1, 0);
+ TakeDamage(dtCactusContact, NULL, 1, 0);
}
}