The grenade consistently explodes in both cases.Anything else is (in my opinion) inconsistent.
If by your logic the preprimed grenades should explode, I think that by the same logic all the remaining auto-shots should be shot (for example, destroying equipment behind the final alien), instead of ending the mission immediately in the middle of a series of autoshots. How else could the soldier stop a series of autoshots being shot in the middle of the alien falling down when it's the final alien, but not when it's not the final alien?
I just merged with the OXCE 7.8.5 commit from 4 days ago and now my game keeps crashing either when loading the battle-scape or when doing something in the battle-scape.The weird thing is that the call-stack refers to something different all the time.I wanted to try whether that also happens with the official OXCE 7.8.5 or only on my locally compiled build but I don't know where to download it. The official download-links only seem to have 7.8.0
Nightly builds are here: https://lxnt.wtf/oxem/#/ExtendedDirect link to 7.8.5: https://lxnt.wtf/oxem/builds//Extended/Extended-7.8.5-dc35fe34f-2022-12-23-win64.7z
[28-12-2022_01-20-57] [FATAL] A fatal error has occurred: Segmentation fault.[28-12-2022_01-20-57] [FATAL] 0x5d2830 OpenXcom::CrossPlatform::stackTrace(void*)[28-12-2022_01-20-57] [FATAL] 0x5d36a0 OpenXcom::CrossPlatform::crashDump(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)[28-12-2022_01-20-57] [FATAL] 0x41c7f0 signalLogger(int)[28-12-2022_01-20-57] [FATAL] 0xa0b0a0 OpenXcom::UfopaediaStartState::think()[28-12-2022_01-20-57] [FATAL] 0x7ffa8bd93aa0 _C_specific_handler[28-12-2022_01-20-57] [FATAL] 0x7ffa8bda89f0 _chkstk[28-12-2022_01-20-57] [FATAL] 0x7ffa8bd352f0 RtlRestoreContext[28-12-2022_01-20-57] [FATAL] 0x7ffa8bda7b00 KiUserExceptionDispatcher[28-12-2022_01-20-57] [FATAL] 0x5a5410 OpenXcom::TileEngine::calculateLighting(OpenXcom::LightLayers, OpenXcom::Position, int, bool)[28-12-2022_01-20-57] [FATAL] 0x5b1000 OpenXcom::TileEngine::explode(OpenXcom::BattleActionAttack, OpenXcom::Position, int, OpenXcom::RuleDamageType const*, int, bool)[28-12-2022_01-20-57] [FATAL] 0x513590 OpenXcom::BattlescapeGenerator::explodePowerSources()[28-12-2022_01-20-57] [FATAL] 0x527b20 OpenXcom::BattlescapeGenerator::run()[28-12-2022_01-20-57] [FATAL] 0x75ce80 OpenXcom::NewBattleState::btnOkClick(OpenXcom::Action*)[28-12-2022_01-20-57] [FATAL] 0x5ef8e0 OpenXcom::InteractiveSurface::handle(OpenXcom::Action*, OpenXcom::State*)[28-12-2022_01-20-57] [FATAL] 0x6af4f0 OpenXcom::State::handle(OpenXcom::Action*)[28-12-2022_01-20-57] [FATAL] 0x5eaf10 OpenXcom::Game::run()[28-12-2022_01-20-57] [FATAL] 0x41c950 SDL_main[28-12-2022_01-20-57] [FATAL] 0xa0cbd0 console_main[28-12-2022_01-20-57] [FATAL] 0xa0ccf0 WinMain[28-12-2022_01-20-57] [FATAL] ??[28-12-2022_01-20-57] [FATAL] ??[28-12-2022_01-20-57] [FATAL] 0x7ffa8a1c5590 BaseThreadInitThunk[28-12-2022_01-20-57] [FATAL] 0x7ffa8bd04830 RtlUserThreadStart[28-12-2022_01-21-09] [FATAL] OpenXcom has crashed: Segmentation fault.
The immedate ending of the turn in the middle of auto-shots seems to be inconstent with the behaviour of ending the turn and exploding primed grenades.
I would suggest that the end-turn phases such as grenades exploding would otherwise be skipped as well when the last alien dies.
Ok, I will fix the autoshots.