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

View File

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