OpenXcom Forum

OpenXcom Forks => OXCE Bugs => OpenXcom Extended (OXCE) => OXCE Bugs FIXED => Topic started by: Dioxine on May 15, 2023, 06:25:23 pm

Title: [FIXED] OXCE 7.9.4: enemies on high difficulties spawn with incorrect HP
Post by: Dioxine on May 15, 2023, 06:25:23 pm
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.
Title: Re: OXCE 7.9.4: enemies on high difficulties spawn with incorrect HP
Post by: Meridian on May 16, 2023, 12:14:50 am
@Yankes: change appeared with this refactor: https://github.com/MeridianOXC/OpenXcom/commit/aad77d495e9423322f46d55739d0423fc3c36a6a

please review
Title: Re: OXCE 7.9.4: enemies on high difficulties spawn with incorrect HP
Post by: Meridian on May 16, 2023, 12:26:01 am
Probably

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

executed at a different stage than before.
Title: Re: OXCE 7.9.4: enemies on high difficulties spawn with incorrect HP
Post by: Yankes 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.