From 88335f112b2d870aafaf3a503b3a4fcecfa64e4e Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Mon, 4 Oct 2010 19:21:09 +0000 Subject: [PATCH] fix for the AI not respecting max-unit-count --- source/glest_game/type_instances/unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index ec7f3256..ba4d42a0 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -1362,7 +1362,7 @@ CommandResult Unit::checkCommand(Command *command) const { throw runtime_error(szBuf); } //if not operative or has not command type => fail - if(!isOperative() || command->getUnit()==this || !getType()->hasCommandType(command->getCommandType())){ + if(!isOperative() || command->getUnit()==this || !getType()->hasCommandType(command->getCommandType())|| !this->getFaction()->reqsOk(command->getCommandType())){ return crFailUndefined; }