From 61e75417a539061d3a1979485a453f2e26759802 Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Sun, 24 Feb 2013 23:56:49 +0000 Subject: [PATCH] Respecting requirements for attack commands . ( Bug fix for attack hot-key cycling through attacks. ) --- source/glest_game/gui/gui.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/glest_game/gui/gui.cpp b/source/glest_game/gui/gui.cpp index fb9a23711..fccee4bee 100644 --- a/source/glest_game/gui/gui.cpp +++ b/source/glest_game/gui/gui.cpp @@ -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++; }