* restore error check that I had commented out while experimenting with sqrt approximations

This commit is contained in:
James McCulloch 2010-07-16 17:13:12 +00:00
parent e3ad4b7b60
commit 4393139496
1 changed files with 3 additions and 4 deletions

View File

@ -131,10 +131,9 @@ bool RoutePlanner::isLegalMove(Unit *unit, const Vec2i &pos2) const {
assert(unit->getPos().dist(pos2) < 1.5);
float d = unit->getPos().dist(pos2);
//if (d > 1.6 || d < 0.7f) {
// printf("\nd = %g", d);
// throw runtime_error("The new Pathfinder lied.");
//}
if (d > 1.5 || d < 0.9f) {
throw runtime_error("The new Pathfinder lied.");
}
const Vec2i &pos1 = unit->getPos();
const int &size = unit->getType()->getSize();