Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlayIdleAnimOnReload=1 Causes to lose highlighting after reload in combat #528

Closed
xMatth3w opened this issue May 1, 2024 · 1 comment
Closed

Comments

@xMatth3w
Copy link

xMatth3w commented May 1, 2024

Basically title.
After enabling this settings, it will play the reload animation to a weapon, but after you reload combat highlight doesn't work and you have to press shift after every reload to higlight critters in combat. I don't know if it's a limitation of this settings or not working as inteded.
Tested on fresh FO2 + newest Sfall

@NovaRain
Copy link
Collaborator

NovaRain commented May 1, 2024

I can't seem to reproduce that in my game. In a random encounter with two group of enemies fighting each other, I shoot someone and reload (playing "idle" animation), all critters still have their combat highlight (outlines) in subsequent turns.

EDIT: OK I got it. This specifically happens when the Target Highlight preference is in the default "targeting only".

Some boring technical details:
PlayIdleAnimOnReload inserts an animation sequence, and at the end of sequence it calls register_end() which invokes combat_anim_begin(). If the Target Highlight is targeting only (combat_highlight == 2), combat_anim_begin() will turn off highlights in combat.
So my fix is simple: force change the setting right before calling register_end() to avoid turning off combat highlights, then restore the setting afterward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants