mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-09-28 03:40:49 +00:00
refactor: deglob std::weak_ptr
This commit is contained in:
@@ -46,7 +46,7 @@ bool MeleeAttackGoal::canUse()
|
||||
if (bestTarget == NULL) return false;
|
||||
if(!bestTarget->isAlive()) return false;
|
||||
if (attackType != eTYPE_NOTSET && (attackType & bestTarget->GetType()) != attackType) return false;
|
||||
target = weak_ptr<Mob>(bestTarget);
|
||||
target = std::<Mob>(bestTarget);
|
||||
delete path;
|
||||
path = mob->getNavigation()->createPath(target.lock());
|
||||
return path != NULL;
|
||||
@@ -71,7 +71,7 @@ void MeleeAttackGoal::start()
|
||||
|
||||
void MeleeAttackGoal::stop()
|
||||
{
|
||||
target = weak_ptr<Mob>();
|
||||
target = std::<Mob>();
|
||||
mob->getNavigation()->stop();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user