diff --git a/source/glest_game/gui/gui.cpp b/source/glest_game/gui/gui.cpp index c3f17196..ff0d13fd 100644 --- a/source/glest_game/gui/gui.cpp +++ b/source/glest_game/gui/gui.cpp @@ -971,8 +971,15 @@ bool Gui::computeTarget(const Vec2i &screenPos, Vec2i &targetPos, const Unit *&t validPosObjWorld= false; if(uc.empty() == false) { - targetUnit= uc.front(); - targetPos= targetUnit->getPos(); + + for(int i=0; igetPos(); + if(targetUnit->getType()->hasSkillClass(scMove)) + {// moving units are more relevant than non moving ones + break; + } + } return true; } else if(obj!=NULL) {