Skip to content

Commit

Permalink
Corrected a reimplementation issue.
Browse files Browse the repository at this point in the history
- In corner cases computer players did not assign TaskRepair tasks to
units stored in repair shops.
  • Loading branch information
klei1984 committed Sep 9, 2024
1 parent ea39361 commit 714eafa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/task_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ void TaskManager::FindTaskForUnit(UnitInfo* unit) {
if (ini_get_setting(INI_OPPONENT) >= OPPONENT_TYPE_APPRENTICE) {
if (unit->GetBaseValues()->GetAttribute(ATTRIB_HITS) != unit->hits ||
(unit->GetOrderState() == ORDER_STATE_STORE &&
unit->GetParent()->GetOrderState() == ORDER_STATE_UNIT_READY)) {
unit->GetParent()->GetOrderState() != ORDER_STATE_UNIT_READY)) {
if (!(unit->flags & STATIONARY)) {
SmartPointer<Task> repair_task(new (std::nothrow) TaskRepair(unit));

Expand Down

0 comments on commit 714eafa

Please sign in to comment.