From 714eafa845b381ef66efbb812352a9856f2f4ac2 Mon Sep 17 00:00:00 2001 From: klei1984 <53688147+klei1984@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:31:25 +0200 Subject: [PATCH] Corrected a reimplementation issue. - In corner cases computer players did not assign TaskRepair tasks to units stored in repair shops. --- src/task_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/task_manager.cpp b/src/task_manager.cpp index c4c9983..6f4508e 100644 --- a/src/task_manager.cpp +++ b/src/task_manager.cpp @@ -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 repair_task(new (std::nothrow) TaskRepair(unit));