1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Simplify blukMoveArmy logic, fix army transfer bugs

This commit is contained in:
Ivan Savenko
2025-08-01 18:21:02 +03:00
parent f773b87cd5
commit bc96515cec
4 changed files with 53 additions and 83 deletions

View File

@@ -21,7 +21,7 @@ void ArmyFormation::rearrangeArmyForWhirlpool(const CGHeroInstance * hero)
void ArmyFormation::addSingleCreatureStacks(const CGHeroInstance * hero)
{
auto freeSlots = hero->getFreeSlotsQueue();
auto freeSlots = hero->getFreeSlots();
while(!freeSlots.empty())
{
@@ -37,8 +37,8 @@ void ArmyFormation::addSingleCreatureStacks(const CGHeroInstance * hero)
break;
}
cb->splitStack(hero, hero, weakestCreature->first, freeSlots.front(), 1);
freeSlots.pop();
cb->splitStack(hero, hero, weakestCreature->first, freeSlots.back(), 1);
freeSlots.pop_back();
}
}