Author Topic: [FIXED] OXCE 7.9.4: enemies on high difficulties spawn with incorrect HP  (Read 1380 times)

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Screen attached. At every difficulty level on which the unit should spawn with +HP bonus for difficulty, it spawns with basic unmodified HP pool instead (suffering ofc loss of accuracies). It affects any and all enemy units. I'm not sure when it happened, but 7.8 was free of the error.
« Last Edit: May 16, 2023, 09:42:24 am by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: OXCE 7.9.4: enemies on high difficulties spawn with incorrect HP
« Reply #1 on: May 16, 2023, 12:14:50 am »
@Yankes: change appeared with this refactor: https://github.com/MeridianOXC/OpenXcom/commit/aad77d495e9423322f46d55739d0423fc3c36a6a

please review

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: OXCE 7.9.4: enemies on high difficulties spawn with incorrect HP
« Reply #2 on: May 16, 2023, 12:26:01 am »
Probably

Code: [Select]
if (_originalFaction == FACTION_HOSTILE)
{
adjustStats(*adjustment);
}

executed at a different stage than before.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: OXCE 7.9.4: enemies on high difficulties spawn with incorrect HP
« Reply #3 on: May 16, 2023, 12:55:48 am »
Ok it should be fixed in OXCE 7.9.5

I cant move this function as would be bit mess to move stat adjust to correct place, I decide to simply update all stats as it should not affect
change armor for friendly units.