Respecting requirements for attack commands . ( Bug fix for attack hot-key cycling through attacks. )

This commit is contained in:
Titus Tscharntke 2013-02-24 23:56:49 +00:00
parent e0bda20f5e
commit 61e75417a5
1 changed files with 4 additions and 2 deletions

View File

@ -627,8 +627,10 @@ void Gui::mouseDownDisplayUnitSkills(int posDisplay) {
const CommandType *ctype=display.getCommandType(k);
if(ctype->getClass() == ccAttack)
{
posDisplay=k;
break;
if(ctype != NULL && unit->getFaction()->reqsOk(ctype)) {
posDisplay=k;
break;
}
}
k++;
}