Fix chopping wood. (Bug introduced by rev.8737).

Fix unitTest.
This commit is contained in:
joris 2013-05-19 18:15:00 +02:00
parent 2b3dacf61d
commit e64b56d0fb
2 changed files with 5 additions and 3 deletions

View file

@ -1103,11 +1103,12 @@ bool COrder_Resource::ActionResourceInit(CUnit &unit)
unit.DeAssignWorkerFromMine(*mine);
this->Resource.Mine = NULL;
}
if (goal && goal->IsAlive() && goal->CurrentAction() != UnitActionBuilt) {
if (goal && goal->IsAlive() == false) {
return false;
}
if (goal && goal->CurrentAction() != UnitActionBuilt) {
unit.AssignWorkerToMine(*goal);
this->Resource.Mine = goal;
} else {
return false;
}
UnitGotoGoal(unit, goal, SUB_MOVE_TO_RESOURCE);

View file

@ -53,6 +53,7 @@ void FillCustomValue(CServerSetup *obj)
obj->GameTypeOption = 52;
obj->Difficulty = 54;
obj->MapRichness = 56;
obj->Opponents = 58;
for (int i = 0; i != PlayerMax; ++i) {
obj->CompOpt[i] = i + 1;
}