fix: attack style reset on weapon swap + ranged style highlight swap #215
No reviewers
Labels
No labels
bug
ci-cd
client
epic:security-hardening
feature
optimization
priority:high
priority:low
priority:medium
server
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
BlackLobster/Server!215
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/attack-style-weapon-swap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two combat-tab bugs:
Weapon swaps no longer reset the selected attack style. The fight
mode carries over whenever the new weapon's panel offers a button
with the same mode (Rapid stays Rapid across crossbows, aggressive
stays aggressive across melee weapons), falling back to the first
style only when it doesn't (e.g. a spear's controlled modes after
swapping to a bow). Autocast and a primed special still clear.
Unequipping the weapon now runs the same reset instead of skipping
it entirely.
The style-button highlight (varp 43) is now driven by each button's
baked CS1 equality constant extracted from the 468 cache instead of
the button's rank in child-id order. On the axe, hammer, bow, claws
and crossbow panels the child ids run out of visual order (top-right
has a higher child id than bottom-left), so the rank heuristic lit
the wrong button: selecting Rapid on a crossbow highlighted
Longrange, and re-installing the panel snapped the highlight to the
wrong style. The behavior table itself was already correct.
a794b976ff9e5c7ede6f