Author Topic: BUG: enemy surrender in the first part(s) of multistage mission, wrong re-equip  (Read 502 times)

Offline psavola

  • Colonel
  • ****
  • Posts: 449
    • View Profile
    • Email
In multistage missions, if you kill or stun everyone, you get the chance to re-equip your team with all the loot you have on your craft as well as everything on the battlefield on the first (or second, in the case of T'Leth) stage. On the other hand, if you go to the designated area and abort to progress to the next stage, you only get to re-equip the team with the items you are carrying or what's on the designated area.

In playing XCF, I noticed that the first stage was ended by enemy surrender (,5047.msg156005.html) and I got the empty re-equip screen.

There seems to be a rather obvious bug - enemy surrender should be treated the same as all the enemies killed or stunned.

Looking at the code, in BattlescapeGenerator::nextStage() is the following check:

                                        // protocol 1: all defenders dead, recover all items.
                                        if (aliensAlive == 0 || autowin)

I suppose either this take into account surrendering enemies directly or they should be marked as dead for the purposes of this check. An alternate way would be "stun" surrendered enemies, so nextStage() logic would probably work as-is.