* added GAE path finder (SearchEngine and friends)

* some small changes to Unit, UnitType, Vec2<> & Map needed for the new path finder
 * compiles, but not hooked up yet, old PathFinder still in use
This commit is contained in:
James McCulloch
2010-07-11 18:31:02 +00:00
parent 277230657c
commit bdd4f306f4
35 changed files with 5547 additions and 76 deletions

View File

@@ -125,6 +125,11 @@ public:
return Vec2<T>(v-*this).length();
}
// strict week ordering, so Vec2<T> can be used as key for set<> or map<>
bool operator<(const Vec2<T> &v) const {
return x < v.x || (x == v.x && y < v.y);
}
float length() const{
#ifdef USE_STREFLOP
return static_cast<float>(streflop::sqrt(static_cast<float>(x*x + y*y)));