Remove AUTO_VAR macro and _toString function (#592)

This commit is contained in:
void_17
2026-03-06 02:11:18 +07:00
committed by GitHub
parent 7d6658fe5b
commit 55231bb8d3
294 changed files with 5067 additions and 5773 deletions

View File

@@ -26,9 +26,9 @@ void HurtByTargetGoal::start()
{
double within = getFollowDistance();
vector<shared_ptr<Entity> > *nearby = mob->level->getEntitiesOfClass(typeid(*mob), AABB::newTemp(mob->x, mob->y, mob->z, mob->x + 1, mob->y + 1, mob->z + 1)->grow(within, 4, within));
for(AUTO_VAR(it, nearby->begin()); it != nearby->end(); ++it)
for(auto& it : *nearby)
{
shared_ptr<PathfinderMob> other = dynamic_pointer_cast<PathfinderMob>(*it);
shared_ptr<PathfinderMob> other = dynamic_pointer_cast<PathfinderMob>(it);
if (this->mob->shared_from_this() == other) continue;
if (other->getTarget() != NULL) continue;
if (other->isAlliedTo(mob->getLastHurtByMob())) continue; // don't target allies