MaxUnitCount did not work correctly for buildings
Buildings in state 'beeing build' were not taken into account. this is fixed now.
This commit is contained in:
parent
6bb687e5cc
commit
5b9f28f21c
|
@ -952,7 +952,7 @@ int Faction::getCountForMaxUnitCount(const UnitType *unitType) const{
|
|||
for(int j=0; j<getUnitCount(); ++j){
|
||||
Unit *unit= getUnit(j);
|
||||
const UnitType *currentUt= unit->getType();
|
||||
if(unitType==currentUt && unit->isOperative()){
|
||||
if(unitType==currentUt && ( unit->isAlive())){
|
||||
count++;
|
||||
}
|
||||
//check if there is any command active which already produces this unit
|
||||
|
|
Loading…
Reference in New Issue