mirror of
https://github.com/glest/glest-source.git
synced 2025-09-01 04:01:47 +02:00
maxUnitCount respected by spawn attack
This commit is contained in:
@@ -176,6 +176,11 @@ void UnitUpdater::updateUnit(Unit *unit) {
|
||||
const UnitType *spawnUnitType = ft->getUnitType(act->getAttackSkillType()->getSpawnUnit());
|
||||
int spawnCount = act->getAttackSkillType()->getSpawnUnitCount();
|
||||
for (int y=0; y < spawnCount; ++y) {
|
||||
if(spawnUnitType->getMaxUnitCount() > 0) {
|
||||
if(spawnUnitType->getMaxUnitCount() <= unit->getFaction()->getCountForMaxUnitCount(spawnUnitType)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
UnitPathInterface *newpath = NULL;
|
||||
switch(this->game->getGameSettings()->getPathFinderType()) {
|
||||
case pfBasic:
|
||||
|
Reference in New Issue
Block a user