mirror of
https://github.com/glest/glest-source.git
synced 2025-08-29 10:49:48 +02:00
fix for the AI not respecting max-unit-count
This commit is contained in:
@@ -1362,7 +1362,7 @@ CommandResult Unit::checkCommand(Command *command) const {
|
|||||||
throw runtime_error(szBuf);
|
throw runtime_error(szBuf);
|
||||||
}
|
}
|
||||||
//if not operative or has not command type => fail
|
//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;
|
return crFailUndefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user