diff --git a/source/glest_game/gui/selection.cpp b/source/glest_game/gui/selection.cpp index 10337921..2f152c1c 100644 --- a/source/glest_game/gui/selection.cpp +++ b/source/glest_game/gui/selection.cpp @@ -61,12 +61,12 @@ void Selection::select(Unit *unit){ } //check if enemy - if(unit->getFactionIndex()!=factionIndex && !isEmpty()){ + if(unit->getFactionIndex() != factionIndex && !isEmpty()) { return; } //check existing enemy - if(selectedUnits.size()==1 && selectedUnits.front()->getFactionIndex()!=factionIndex){ + if(selectedUnits.size()==1 && selectedUnits.front()->getFactionIndex() != factionIndex) { clear(); } @@ -129,7 +129,9 @@ bool Selection::isUniform() const{ } bool Selection::isEnemy() const{ - return selectedUnits.size()==1 && selectedUnits.front()->getFactionIndex()!=factionIndex; + return selectedUnits.size() == 1 && + (selectedUnits.front()->getFactionIndex() != factionIndex || + factionIndex == (GameConstants::maxPlayers -1 + fpt_Observer)); } bool Selection::isCommandable() const{ diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index 0b1ec597..54bcefc6 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -1472,11 +1472,18 @@ string Unit::getDesc() const { //command info if(commands.empty() == false) { str+= "\n" + commands.front()->getCommandType()->getName(); - if(commands.size()>1){ - str+="\n"+lang.get("OrdersOnQueue")+": "+intToStr(commands.size()); + if(commands.size() > 1) { + str += "\n" + lang.get("OrdersOnQueue") + ": " + intToStr(commands.size()); + Commands::const_iterator it= commands.begin(); + for(unsigned int i = 0; i < min((size_t)4,commands.size()); ++i) { + const CommandType *ct = (*it)->getCommandType(); + //str += "\n" + ct->getDesc(this->getTotalUpgrade()); + str += "\n#" + intToStr(i+1) + " " + ct->getName(); + it++; + } } } - else{ + else { //can store if(getType()->getStoredResourceCount()>0){ for(int i=0; igetStoredResourceCount(); ++i){