removed more unused code for last path cache which was already removed
This commit is contained in:
parent
8d69cc02fd
commit
bb2e2d0f64
|
@ -662,10 +662,6 @@ TravelState PathFinder::aStar(Unit *unit, const Vec2i &targetPos, bool inBailout
|
|||
codeLocation = "14";
|
||||
path->add(nodePos);
|
||||
}
|
||||
if(basicPathFinder) {
|
||||
codeLocation = "15";
|
||||
basicPathFinder->addToLastPathCache(nodePos);
|
||||
}
|
||||
}
|
||||
codeLocation = "16";
|
||||
unit->setUsePathfinderExtendedMaxNodes(false);
|
||||
|
@ -1021,10 +1017,6 @@ TravelState PathFinder::aStar(Unit *unit, const Vec2i &targetPos, bool inBailout
|
|||
codeLocation = "58";
|
||||
path->add(nodePos);
|
||||
}
|
||||
if(basicPathFinder) {
|
||||
codeLocation = "59";
|
||||
basicPathFinder->addToLastPathCache(nodePos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -122,17 +122,6 @@ void UnitPathBasic::add(const Vec2i &path) {
|
|||
pathQueue.push_back(path);
|
||||
}
|
||||
|
||||
void UnitPathBasic::addToLastPathCache(const Vec2i &path) {
|
||||
if(this->map != NULL) {
|
||||
if(this->map->isInside(path) == false) {
|
||||
throw megaglest_runtime_error("Invalid map path position = " + path.getString() + " map w x h = " + intToStr(map->getW()) + " " + intToStr(map->getH()));
|
||||
}
|
||||
else if(this->map->isInsideSurface(this->map->toSurfCoords(path)) == false) {
|
||||
throw megaglest_runtime_error("Invalid map surface path position = " + path.getString() + " map surface w x h = " + intToStr(map->getSurfaceW()) + " " + intToStr(map->getSurfaceH()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vec2i UnitPathBasic::pop(bool removeFrontPos) {
|
||||
if(pathQueue.empty() == true) {
|
||||
throw megaglest_runtime_error("pathQueue.size() = " + intToStr(pathQueue.size()));
|
||||
|
|
|
@ -197,7 +197,6 @@ public:
|
|||
virtual void clearBlockCount() { blockCount = 0; }
|
||||
virtual void incBlockCount();
|
||||
virtual void add(const Vec2i &path);
|
||||
void addToLastPathCache(const Vec2i &path);
|
||||
Vec2i pop(bool removeFrontPos=true);
|
||||
virtual int getBlockCount() const { return blockCount; }
|
||||
virtual int getQueueCount() const { return (int)pathQueue.size(); }
|
||||
|
|
Loading…
Reference in New Issue