mirror of
https://github.com/glest/glest-source.git
synced 2025-10-01 09:56:41 +02:00
- added a resource harvest success cache for stuck units to look at when they cannot harvest.
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user