Added a safeguard to the death animation fix on combat start

This commit is contained in:
NovaRain
2026-02-23 15:23:23 +08:00
parent d5c79deb12
commit bac9e630f9
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -242,7 +242,7 @@ struct GameObject {
struct {
MiscFlags sceneryFlags; // unused for scenery? (aka updated_flags)
MiscFlags doorFlags; // used for doors states open/locked/jammed (aka cur_open_flags)
long unused[9]; // offset 0x40 (not saved)
long unused[9]; // offset 0x40 (not saved)
} scenery;
};
+2 -1
View File
@@ -520,7 +520,8 @@ static void __stdcall combat_begin_anim_stop_hook() {
const fo::AnimationSet& set = animSet[i];
if (set.currentAnim >= 1 &&
(set.animations[set.currentAnim - 1].animType == fo::ANIM_TYPE_ANIMATE_FOREVER ||
((set.animations[set.currentAnim - 1].source->artFid & 0xFF0000) >> 16 >= fo::ANIM_fall_back &&
(set.animations[set.currentAnim - 1].source != nullptr &&
(set.animations[set.currentAnim - 1].source->artFid & 0xFF0000) >> 16 >= fo::ANIM_fall_back &&
(set.animations[set.currentAnim - 1].source->artFid & 0xFF0000) >> 16 <= fo::ANIM_fall_front_blood)))
{
continue;