mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-16 15:41:52 +00:00
refactor: deglob std::weak_ptr
This commit is contained in:
@@ -41,7 +41,7 @@ bool NearestAttackableTargetGoal::canUse()
|
||||
std::shared_ptr<Mob> potentialTarget = mob->level->getNearestAttackablePlayer(mob->shared_from_this(), within);
|
||||
if (canAttack(potentialTarget, false))
|
||||
{
|
||||
target = weak_ptr<Mob>(potentialTarget);
|
||||
target = std::<Mob>(potentialTarget);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,7 @@ bool NearestAttackableTargetGoal::canUse()
|
||||
std::shared_ptr<Mob> potTarget = dynamic_pointer_cast<Mob>(*it);
|
||||
if (canAttack(potTarget, false))
|
||||
{
|
||||
target = weak_ptr<Mob>(potTarget);
|
||||
target = std::<Mob>(potTarget);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user