From ae9d20a6cf84a1df7d5b981cb4650f309e618f10 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sun, 1 May 2011 03:23:15 +0000 Subject: [PATCH] - bugfix for new AI repair logic to properly detect damaged castle type units --- source/glest_game/ai/ai_rule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/glest_game/ai/ai_rule.cpp b/source/glest_game/ai/ai_rule.cpp index 68394f33..22acec1f 100644 --- a/source/glest_game/ai/ai_rule.cpp +++ b/source/glest_game/ai/ai_rule.cpp @@ -113,7 +113,7 @@ bool AiRuleRepair::test(){ if(pt != NULL) { const UnitType *ut = dynamic_cast(pt); if( ut != NULL && ut->hasCommandClass(ccHarvest) == true && - ut->getStoredResourceCount() > 0) { + u->getType()->getStoredResourceCount() > 0) { unitCanProduceWorker = true; } }