Skip to content

Commit

Permalink
PopBlanc - Add E Distance Check
Browse files Browse the repository at this point in the history
Add small distance check to make it more accurate when closer to enemy.
  • Loading branch information
tr33s committed Feb 16, 2017
1 parent 809a6f4 commit 47a80d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PopBlanc/PopBlanc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ bool CastRSpell(IUnit* target)
}
}

return bCastSpell(E, target) && E->CastOnUnit(target);
return bCastSpell(E, target) && (target->ServerPosition() - Player->ServerPosition()).Length() > 40 && E->CastOnUnit(target);
}

void Combo(IUnit* targ = nullptr, bool force = false)
Expand All @@ -133,7 +133,7 @@ void Combo(IUnit* targ = nullptr, bool force = false)
return;
}

if (bCastSpell(E, target) && E->CastOnUnit(target))
if (bCastSpell(E, target) && (target->ServerPosition() - Player->ServerPosition()).Length() > 40 && E->CastOnUnit(target))
{
return;
}
Expand Down

0 comments on commit 47a80d7

Please sign in to comment.