mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-11 19:53:52 +00:00
Remove AUTO_VAR macro and _toString function (#592)
This commit is contained in:
parent
7d6658fe5b
commit
55231bb8d3
294 changed files with 5067 additions and 5773 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue