Fix AlienQueen code, closes colobot/colobot#940

coolant-mod
krzys-h 2017-06-03 21:53:38 +02:00
parent 806d30cc3b
commit 6b8e28c594
2 changed files with 4 additions and 2 deletions

View File

@ -38,11 +38,12 @@ int object::WaspCount()
while ( true )
{
item = retobject(i++);
if ( item == null ) return total;
if ( item == null ) break;
if ( item.category == AlienWasp )
{
total ++;
}
}
return total;
}

View File

@ -64,11 +64,12 @@ int object::AlienCount()
while ( true )
{
item = retobject(i++);
if ( item == null ) return total;
if ( item == null ) break;
if ( item.category == AlienAnt )
{
total ++;
}
}
return total;
}