From 07ad68bc156b3ab70401723bb074a29588ad3cb7 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 17:10:34 +0700 Subject: dynamic_pointer_cast -> std::dynamic_pointer_cast --- Minecraft.World/TargetGoal.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Minecraft.World/TargetGoal.cpp') diff --git a/Minecraft.World/TargetGoal.cpp b/Minecraft.World/TargetGoal.cpp index 28102c60..8f6eaa47 100644 --- a/Minecraft.World/TargetGoal.cpp +++ b/Minecraft.World/TargetGoal.cpp @@ -69,16 +69,16 @@ bool TargetGoal::canAttack(std::shared_ptr target, bool allowInvulnerable) if (!target->isAlive()) return false; if (!mob->canAttackType(target->GetType())) return false; - std::shared_ptr tamableAnimal = dynamic_pointer_cast(mob->shared_from_this()); + std::shared_ptr tamableAnimal = std::dynamic_pointer_cast(mob->shared_from_this()); if (tamableAnimal != NULL && tamableAnimal->isTame()) { - std::shared_ptr tamableTarget = dynamic_pointer_cast(target); + std::shared_ptr tamableTarget = std::dynamic_pointer_cast(target); if (tamableTarget != NULL && tamableTarget->isTame()) return false; if (target == tamableAnimal->getOwner()) return false; } - else if (dynamic_pointer_cast(target) != NULL) + else if (std::dynamic_pointer_cast(target) != NULL) { - if (!allowInvulnerable && (dynamic_pointer_cast(target))->abilities.invulnerable) return false; + if (!allowInvulnerable && (std::dynamic_pointer_cast(target))->abilities.invulnerable) return false; } if (!mob->isWithinRestriction(Mth::floor(target->x), Mth::floor(target->y), Mth::floor(target->z))) return false; -- cgit v1.2.3