Skip to content

Commit 23f857e

Browse files
committed
Fixed the 'Not enough equipment to fully re-equip squad' bug.
1 parent 30935d9 commit 23f857e

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

src/Battlescape/DebriefingState.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3075,37 +3075,37 @@ void DebriefingState::recoverItems(std::vector<BattleItem*> *from, Base *base, C
30753075
else
30763076
{
30773077

3078-
// coop fix
3079-
if (!bi->getUnit())
3080-
{
3081-
continue;
3082-
}
3083-
30843078
if (rule->isRecoverable() && !bi->getXCOMProperty())
30853079
{
30863080
if (rule->getBattleType() == BT_CORPSE)
30873081
{
3088-
BattleUnit *corpseUnit = bi->getUnit();
3089-
if (corpseUnit->getStatus() == STATUS_DEAD)
3082+
3083+
// coop fix
3084+
if (bi->getUnit())
30903085
{
3091-
if (rule->isCorpseRecoverable())
3086+
BattleUnit* corpseUnit = bi->getUnit();
3087+
if (corpseUnit->getStatus() == STATUS_DEAD)
30923088
{
3093-
addItemsToBaseStores(corpseUnit->getArmor()->getCorpseGeoscape(), base, 1, true);
3094-
addStat("STR_ALIEN_CORPSES_RECOVERED", 1, bi->getRules()->getRecoveryPoints());
3089+
if (rule->isCorpseRecoverable())
3090+
{
3091+
addItemsToBaseStores(corpseUnit->getArmor()->getCorpseGeoscape(), base, 1, true);
3092+
addStat("STR_ALIEN_CORPSES_RECOVERED", 1, bi->getRules()->getRecoveryPoints());
3093+
}
30953094
}
3096-
}
3097-
else if (corpseUnit->getStatus() == STATUS_UNCONSCIOUS ||
3098-
// or it's in timeout because it's unconscious from the previous stage
3099-
// units can be in timeout and alive, and we assume they flee.
3100-
(corpseUnit->isIgnored() &&
3101-
corpseUnit->getHealth() > 0 &&
3102-
corpseUnit->getHealth() < corpseUnit->getStunlevel()))
3103-
{
3104-
if (corpseUnit->getOriginalFaction() == FACTION_HOSTILE)
3095+
else if (corpseUnit->getStatus() == STATUS_UNCONSCIOUS ||
3096+
// or it's in timeout because it's unconscious from the previous stage
3097+
// units can be in timeout and alive, and we assume they flee.
3098+
(corpseUnit->isIgnored() &&
3099+
corpseUnit->getHealth() > 0 &&
3100+
corpseUnit->getHealth() < corpseUnit->getStunlevel()))
31053101
{
3106-
recoverAlien(corpseUnit, base, craft);
3102+
if (corpseUnit->getOriginalFaction() == FACTION_HOSTILE)
3103+
{
3104+
recoverAlien(corpseUnit, base, craft);
3105+
}
31073106
}
31083107
}
3108+
31093109
}
31103110
// only add recovery points for unresearched items
31113111
else if (!_game->getSavedGame()->isResearched(rule->getRequirements()))

src/Menu/MainMenuState.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ MainMenuState::MainMenuState(bool updateCheck)
244244
// coop version
245245
_textCoopVersion->setAlign(ALIGN_CENTER);
246246
_textCoopVersion->setSmall();
247-
_textCoopVersion->setText("Coop Mod (Windows XP) 1.5.1 [v2026-03-07]");
247+
_textCoopVersion->setText("Coop Mod 1.5.2 [v2026-03-10]");
248248

249249
}
250250

0 commit comments

Comments
 (0)