mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 04:02:30 +01:00
fix for the AI not respecting max-unit-count
This commit is contained in:
parent
d38b46a529
commit
88335f112b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user