diff options
Diffstat (limited to 'src/Mobs')
-rw-r--r-- | src/Mobs/Enderman.cpp | 4 | ||||
-rw-r--r-- | src/Mobs/Monster.cpp | 4 | ||||
-rw-r--r-- | src/Mobs/Squid.cpp | 5 |
3 files changed, 5 insertions, 8 deletions
diff --git a/src/Mobs/Enderman.cpp b/src/Mobs/Enderman.cpp index b7013affd..01e13713d 100644 --- a/src/Mobs/Enderman.cpp +++ b/src/Mobs/Enderman.cpp @@ -193,10 +193,10 @@ void cEnderman::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) return; } - // Take damage when touching water, drowning damage seems to be most appropriate + // Take damage when wet, drowning damage seems to be most appropriate if ( cChunkDef::IsValidHeight(POSY_TOINT) && - (GetWorld()->IsWeatherWetAtXYZ(GetPosition().Floor()) || IsSwimming()) + (GetWorld()->IsWeatherWetAtXYZ(GetPosition().Floor()) || IsInWater()) ) { EventLosePlayer(); diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index db1150f67..03b809275 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -194,7 +194,7 @@ void cMonster::MoveToWayPoint(cChunk & a_Chunk) { if ( (IsOnGround() && (GetSpeed().SqrLength() <= 0.5)) || // If walking on the ground, we need to slow down first, otherwise we miss the jump - IsSwimming() + IsInWater() ) { m_bOnGround = false; @@ -221,7 +221,7 @@ void cMonster::MoveToWayPoint(cChunk & a_Chunk) { Distance *= 2.5f; } - else if (IsSwimming()) + else if (IsInWater()) { Distance *= 1.3f; } diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp index 8ae688a1b..224ec6a06 100644 --- a/src/Mobs/Squid.cpp +++ b/src/Mobs/Squid.cpp @@ -47,7 +47,7 @@ void cSquid::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) return; } - if (!IsSubmerged()) + if (!IsHeadInWater()) { if (m_AirLevel <= 0) { @@ -79,6 +79,3 @@ void cSquid::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) super::Tick(a_Dt, a_Chunk); } - - - |