diff --git a/source/glest_game/gui/gui.cpp b/source/glest_game/gui/gui.cpp index 8ace6f90..cc501604 100644 --- a/source/glest_game/gui/gui.cpp +++ b/source/glest_game/gui/gui.cpp @@ -647,29 +647,6 @@ void Gui::mouseDownDisplayUnitSkills(int posDisplay) { if(selection.isUniform()) { const CommandType *ct = display.getCommandType(posDisplay); - // try to switch to next attack type - if(activeCommandClass == ccAttack && activeCommandType!=NULL) { - - int maxI = unit->getType()->getCommandTypeCount(); - int cmdTypeId = activeCommandType->getId(); - int cmdTypeIdNext = cmdTypeId+1; - - while(cmdTypeIdNext != cmdTypeId) { - if(cmdTypeIdNext >= maxI) { - cmdTypeIdNext = 0; - } - const CommandType *ctype = display.getCommandType(cmdTypeIdNext); - if(ctype != NULL && ctype->getClass() == ccAttack) { - if(ctype != NULL && unit->getFaction()->reqsOk(ctype)) { - posDisplay=cmdTypeIdNext; - ct = display.getCommandType(posDisplay); - break; - } - } - cmdTypeIdNext++; - } - } - if(ct != NULL && unit->getFaction()->reqsOk(ct)) { activeCommandType= ct; activeCommandClass= activeCommandType->getClass(); @@ -681,9 +658,7 @@ void Gui::mouseDownDisplayUnitSkills(int posDisplay) { return; } } - - //non uniform selection - else { + else {//non uniform selection activeCommandType= NULL; activeCommandClass= display.getCommandClass(posDisplay); if (activeCommandClass == ccAttack) {