mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-09-27 10:10:43 +00:00
refactor: unglob std::dynamic_pointer_cast
This commit is contained in:
@@ -13,7 +13,7 @@ bool DefendVillageTargetGoal::canUse()
|
||||
{
|
||||
std::shared_ptr<Village> village = golem->getVillage();
|
||||
if (village == NULL) return false;
|
||||
potentialTarget = std::weak_ptr<Mob>(village->getClosestAggressor(dynamic_pointer_cast<Mob>(golem->shared_from_this())));
|
||||
potentialTarget = std::weak_ptr<Mob>(village->getClosestAggressor(std::dynamic_pointer_cast<Mob>(golem->shared_from_this())));
|
||||
return canAttack(potentialTarget.lock(), false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user