I still don't know anything about the exe but here is a mad idea:
When sfall detects an animation that is mid-way in map_exit, can't it try to cancel it and force it into a single frame animation?
For testing:
The crash: Take desert1 and put any critter on it, give it a script (EcBandit; or preferably something not hostile on LoS) and give that critter:
procedure map_exit_p_proc begin
critter_dmg(self_obj, 119, 256);
end
in map_exit. This should force a crash every time. [edit: it crashes the next time you try to enter a map, probably as desert1 isn't saved, when I had this on a different map (that is saved), it crashed immediately.]
The fix: However, if you force the critter into a single frame animation first, example (add the following to EcBandit):
procedure map_update_p_proc begin
anim(self_obj, 48, -1);
critter_injure(self_obj, 8);
end
it does not crash on map exit. [edit: because it blocks the animation, I guess.]
...
If the engine could somehow twist these animations into a SF (in map_exit), maybe it could fix these crashes (example: a critter explodes during map_exit).
...
Here's the folder of the files I put together to test if the above is correct in essence:
https://easyupload.io/u9owru
...
Idk, if this is useful or feasible, but it's a script stunt to make [
critter_dmg(
self_obj, 119, 256);] in map_exit work. Pointless, maybe... but you do get the scream on map_exit (for a cinematic walk off, for example) [edit: or play an sfx...]... which you don't get with kill_critter or Dmg_NoAnimate.
Anyway, I guess it all depends if the SF can be shoehorned in before map_exit fully executes and then doesn't know what to do with the critter in mid-animation.
...
P.S. This works too:
procedure map_exit_p_proc begin
critter_dmg(self_obj, 119, 256);
anim(self_obj, 48, -1);
end
Maybe I'm dumb, but when I can fix it in script, no reason why sfall shouldn't be able too, right? Then again, I don't know how to detect if a critter is in mid-animation...
Anyway, just an idea of a (crash) fix that does work in script.
[edit: don't do this, it was a glitch.]
[Glitch (explained): In 4.3.6 & 4.3.7 I can put the above in EcBandit. When I then leave the map, it plays the scream and I crash when I enter the next map. However, when I save on the map, then load that save and try the same, I skip the crash in 90%* of all times (*a fresh start needed two or three tries before it became consistent). But it seems the EcBandit is not set to dead in those cases. When I empty the music folder, it fails the skip entirely (no idea why). This was fairly consistent at my end. It also only works with sfall, w/o it I crashed every time I tried.]