1
0

Fixed cactus detection and zombie pigman sword (#3584)

Fixes for issues #902 and #2917
This commit is contained in:
Bond-009
2017-02-25 19:14:08 +01:00
committed by Mattes D
parent 7c17f77c84
commit 6fe863c2ad
3 changed files with 14 additions and 1 deletions

View File

@@ -1359,7 +1359,8 @@ void cEntity::DetectCacti(void)
((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 < w) && (GetWorld()->GetBlock(X, Y, Z - 1) == E_BLOCK_CACTUS)) ||
(((GetPosY() - Y < 1) && (GetWorld()->GetBlock(X, Y, Z) == E_BLOCK_CACTUS))))
(((Y + 1) - GetPosY() < w) && (GetWorld()->GetBlock(X, Y + 1, Z) == E_BLOCK_CACTUS)) ||
((GetPosY() - Y < 1) && (GetWorld()->GetBlock(X, Y - 1, Z) == E_BLOCK_CACTUS)))
)
{
TakeDamage(dtCactusContact, nullptr, 1, 0);