Author Topic: FIX: Mod items without listOrder are considered live aliens by TransferItemsStat  (Read 4177 times)

Offline Phezzan

  • Sergeant
  • **
  • Posts: 37
  • Twilight
    • View Profile
What this bug affects:
   Affected items cannot be transferred unless the receiving base has Alien Containment.
   For me - I couldn't send a custom Tank.

Currently this source file determines what is 'alive' by checking the index against the number of items that were not live aliens during initialization.

Unfortunately it doesn't attempt to reorder items before any live aliens it already added.
(probably because a reordered list would desync the index with a string vector or something)

I wrote a  couple little private functions to simplify determining which index is what type, and then asked the RuleItem itself everytime I needed to know.

It worked for me - hopefully I didn't miss anything.

Let me know if I screwed up the patch - alternatively I could learn how to make pull requests.

PS: I believe this change compiles clean with -Wall and -Wextra
« Last Edit: July 03, 2013, 08:38:50 pm by Phezzan »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
nice catch, thanks, added to master.