diff options
Diffstat (limited to 'Minecraft.World/SitGoal.cpp')
| -rw-r--r-- | Minecraft.World/SitGoal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Minecraft.World/SitGoal.cpp b/Minecraft.World/SitGoal.cpp index 90180201..b79b2df7 100644 --- a/Minecraft.World/SitGoal.cpp +++ b/Minecraft.World/SitGoal.cpp @@ -20,7 +20,7 @@ bool SitGoal::canUse() if (mob->isInWater()) return false; if (!mob->onGround) return false; - shared_ptr<Mob> owner = mob->getOwner(); + shared_ptr<LivingEntity> owner = dynamic_pointer_cast<LivingEntity>( mob->getOwner() ); if (owner == NULL) return true; // owner not on level if (mob->distanceToSqr(owner) < FollowOwnerGoal::TeleportDistance * FollowOwnerGoal::TeleportDistance && owner->getLastHurtByMob() != NULL) return false; |
