* restore error check that I had commented out while experimenting with sqrt approximations
This commit is contained in:
parent
e3ad4b7b60
commit
4393139496
|
@ -131,10 +131,9 @@ bool RoutePlanner::isLegalMove(Unit *unit, const Vec2i &pos2) const {
|
||||||
assert(unit->getPos().dist(pos2) < 1.5);
|
assert(unit->getPos().dist(pos2) < 1.5);
|
||||||
|
|
||||||
float d = unit->getPos().dist(pos2);
|
float d = unit->getPos().dist(pos2);
|
||||||
//if (d > 1.6 || d < 0.7f) {
|
if (d > 1.5 || d < 0.9f) {
|
||||||
// printf("\nd = %g", d);
|
throw runtime_error("The new Pathfinder lied.");
|
||||||
// throw runtime_error("The new Pathfinder lied.");
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
const Vec2i &pos1 = unit->getPos();
|
const Vec2i &pos1 = unit->getPos();
|
||||||
const int &size = unit->getType()->getSize();
|
const int &size = unit->getType()->getSize();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user