After interrupting any animations and then using an AOE explosion attack that kills some targets, 1 or more targets play their death/damage animation before the explosion animation, instead of after.
Video
Environment:
Clean Fallout 2 no mods + sfall 4.5 (also reproduced on sfall 4.4.4+ and 5+)
AllowUnsafeScripting=0 (no unsafe scripting)
Does NOT happen on vanilla Fallout 2 without sfall(in my testes)
Steps to Reproduce:
- Load attached save
- Spam movement to interrupt the walking animation.
- Throw a frag grenade at a group of 2+ critters (the bug occurs on every load, usually on the 1-2 grenade).
Workaround:
Calling empty reg_anim_begin/reg_anim_end cycles in AFTERHITROLL prevents the bug:
reg_anim_combat_check(0);
for (i = 0; i < 7; i = i + 1) begin // less than 7 is not enough
reg_anim_begin();
reg_anim_end();
end
My Thoughts:
Since the bug only occurs with sfall (not vanilla) and is fixed by 7+ empty reg_anim_begin/end cycles, the likely cause is LockAnimSlot() setting an 8-frame lock on slots after reg_anim_clear. This blocks animationRegisterPing from finding correct slots for AOE extra targets, causing death anims to fire before the explosion.
Suggested Fix:
In LockAnimSlot, skip locking when the slot is already completed:
static long __fastcall LockAnimSlot(long slot) {
if (slot < animationLimit
&& animSet[slot].currentAnim != -1000 // skip finished slots
&& animSet[slot].counter != animSet[slot].totalAnimCount)
{
lockAnimSet[slot] = 8;
}
return slot;
}
But couldn't compile sfall locally to verify, so maybe I'm totally wrong on the cause! : )
After interrupting any animations and then using an AOE explosion attack that kills some targets, 1 or more targets play their death/damage animation before the explosion animation, instead of after.
Video
Environment:
Clean Fallout 2 no mods + sfall 4.5 (also reproduced on sfall 4.4.4+ and 5+)
AllowUnsafeScripting=0 (no unsafe scripting)
Does NOT happen on vanilla Fallout 2 without sfall(in my testes)
Steps to Reproduce:
Workaround:
Calling empty reg_anim_begin/reg_anim_end cycles in AFTERHITROLL prevents the bug:
My Thoughts:
Since the bug only occurs with sfall (not vanilla) and is fixed by 7+ empty reg_anim_begin/end cycles, the likely cause is LockAnimSlot() setting an 8-frame lock on slots after reg_anim_clear. This blocks animationRegisterPing from finding correct slots for AOE extra targets, causing death anims to fire before the explosion.
Suggested Fix:
In
LockAnimSlot, skip locking when the slot is already completed:But couldn't compile sfall locally to verify, so maybe I'm totally wrong on the cause! : )