aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/TargetGoal.cpp
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 17:36:56 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 17:36:56 +0700
commit7ae0c13854d94ac2153cd3bb05ce18044b7cf8bb (patch)
tree95006852217f8f113288ea34988ae91c001a5de6 /Minecraft.World/TargetGoal.cpp
parent07ad68bc156b3ab70401723bb074a29588ad3cb7 (diff)
Revert "dynamic_pointer_cast -> std::dynamic_pointer_cast"
This reverts commit 07ad68bc156b3ab70401723bb074a29588ad3cb7.
Diffstat (limited to 'Minecraft.World/TargetGoal.cpp')
-rw-r--r--Minecraft.World/TargetGoal.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Minecraft.World/TargetGoal.cpp b/Minecraft.World/TargetGoal.cpp
index 8f6eaa47..28102c60 100644
--- a/Minecraft.World/TargetGoal.cpp
+++ b/Minecraft.World/TargetGoal.cpp
@@ -69,16 +69,16 @@ bool TargetGoal::canAttack(std::shared_ptr<Mob> target, bool allowInvulnerable)
if (!target->isAlive()) return false;
if (!mob->canAttackType(target->GetType())) return false;
- std::shared_ptr<TamableAnimal> tamableAnimal = std::dynamic_pointer_cast<TamableAnimal>(mob->shared_from_this());
+ std::shared_ptr<TamableAnimal> tamableAnimal = dynamic_pointer_cast<TamableAnimal>(mob->shared_from_this());
if (tamableAnimal != NULL && tamableAnimal->isTame())
{
- std::shared_ptr<TamableAnimal> tamableTarget = std::dynamic_pointer_cast<TamableAnimal>(target);
+ std::shared_ptr<TamableAnimal> tamableTarget = dynamic_pointer_cast<TamableAnimal>(target);
if (tamableTarget != NULL && tamableTarget->isTame()) return false;
if (target == tamableAnimal->getOwner()) return false;
}
- else if (std::dynamic_pointer_cast<Player>(target) != NULL)
+ else if (dynamic_pointer_cast<Player>(target) != NULL)
{
- if (!allowInvulnerable && (std::dynamic_pointer_cast<Player>(target))->abilities.invulnerable) return false;
+ if (!allowInvulnerable && (dynamic_pointer_cast<Player>(target))->abilities.invulnerable) return false;
}
if (!mob->isWithinRestriction(Mth::floor(target->x), Mth::floor(target->y), Mth::floor(target->z))) return false;