[-] Fixed worker freeze bug
This commit is contained in:
parent
c6a31c7a80
commit
979914e20c
2 changed files with 4 additions and 6 deletions
|
@ -895,7 +895,7 @@ int COrder_Resource::StopGathering(CUnit &unit)
|
|||
|
||||
// Find and send to resource deposit.
|
||||
CUnit *depot = FindDeposit(unit, 1000, unit.CurrentResource);
|
||||
if (!depot || !unit.ResourcesHeld) {
|
||||
if (!depot || !unit.ResourcesHeld || this->Finished) {
|
||||
if (!(resinfo.HarvestFromOutside || resinfo.TerrainHarvester)) {
|
||||
Assert(unit.Container);
|
||||
DropOutOnSide(unit, LookingW, source);
|
||||
|
@ -940,10 +940,6 @@ int COrder_Resource::MoveToDepot(CUnit &unit)
|
|||
CPlayer &player = *unit.Player;
|
||||
Assert(&goal);
|
||||
|
||||
if (this->Finished) {
|
||||
return 0; // Could happen when mining near to depot
|
||||
}
|
||||
|
||||
switch (DoActionMove(unit)) { // reached end-point?
|
||||
case PF_UNREACHABLE:
|
||||
return -1;
|
||||
|
|
|
@ -808,7 +808,9 @@ void CButtonPanel::Draw()
|
|||
ButtonUnderCursor == i && KeyState != KeyStateInput) {
|
||||
DrawPopup(buttons[i], UI.ButtonPanel.Buttons[i], UI.ButtonPanel.Buttons[i].X,
|
||||
UI.ButtonPanel.Buttons[i].Y);
|
||||
UpdateStatusLineForButton(buttons[i]);
|
||||
if (!Preference.NoStatusLineTooltips) {
|
||||
UpdateStatusLineForButton(buttons[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue