summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Skeleton.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-01-25 22:36:32 +0100
committerMattes D <github@xoft.cz>2014-01-25 22:36:32 +0100
commitcdcad2237a91dfd18cde539c300034f84bc8c07b (patch)
tree5f3266637858980f29ff3ee4cc4c116e575797d3 /src/Mobs/Skeleton.cpp
parentMerge pull request #583 from mc-server/ChangeToPolarSSL (diff)
parentDid what xoft recommended (diff)
downloadcuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.tar
cuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.tar.gz
cuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.tar.bz2
cuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.tar.lz
cuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.tar.xz
cuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.tar.zst
cuberite-cdcad2237a91dfd18cde539c300034f84bc8c07b.zip
Diffstat (limited to 'src/Mobs/Skeleton.cpp')
-rw-r--r--src/Mobs/Skeleton.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Mobs/Skeleton.cpp b/src/Mobs/Skeleton.cpp
index 509c2191e..4c8e78988 100644
--- a/src/Mobs/Skeleton.cpp
+++ b/src/Mobs/Skeleton.cpp
@@ -30,15 +30,18 @@ void cSkeleton::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cSkeleton::MoveToPosition(const Vector3f & a_Position)
{
- m_Destination = a_Position;
-
// If the destination is in the sun and if it is not night AND the skeleton isn't on fire then block the movement.
- if (!IsOnFire() && m_World->GetTimeOfDay() < 13187 && m_World->GetBlockSkyLight((int) a_Position.x, (int) a_Position.y, (int) a_Position.z) == 15)
+ if (
+ !IsOnFire() &&
+ (m_World->GetTimeOfDay() < 13187) &&
+ (m_World->GetBlockSkyLight((int) a_Position.x, (int) a_Position.y, (int) a_Position.z) == 15)
+ )
{
m_bMovingToDestination = false;
return;
}
- m_bMovingToDestination = true;
+
+ super::MoveToPosition(a_Position);
}