refactor: deglob std::weak_ptr

This commit is contained in:
Tropical
2026-03-08 22:43:59 +01:00
committed by JuiceyDev
parent 6e56e07c6b
commit a744f8f471
70 changed files with 125 additions and 125 deletions
+2 -2
View File
@@ -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();
}