fix for the AI not respecting max-unit-count

This commit is contained in:
Titus Tscharntke 2010-10-04 19:21:09 +00:00
parent d38b46a529
commit 88335f112b
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}