- added a resource harvest success cache for stuck units to look at when they cannot harvest.

This commit is contained in:
Mark Vejvoda
2010-10-20 07:28:27 +00:00
parent ddb4c42bf5
commit 6104dedc76
5 changed files with 73 additions and 3 deletions

View File

@@ -616,6 +616,7 @@ void UnitUpdater::updateHarvest(Unit *unit) {
unit->setTargetPos(targetPos);
command->setPos(targetPos);
unit->setLoadCount(0);
unit->getFaction()->addResourceTypeTargetToCache(r->getType(), targetPos);
switch(this->game->getGameSettings()->getPathFinderType()) {
case pfBasic:
@@ -675,6 +676,7 @@ void UnitUpdater::updateHarvest(Unit *unit) {
unit->setTargetPos(targetPos);
command->setPos(targetPos);
unit->setLoadCount(0);
unit->getFaction()->addResourceTypeTargetToCache(r->getType(), targetPos);
switch(this->game->getGameSettings()->getPathFinderType()) {
case pfBasic: