Skip to content

Conversation

@Jepvid
Copy link
Contributor

@Jepvid Jepvid commented Jan 4, 2026

add a VB to enable 2hand idle animation

Build Artifacts

@Malkierian Malkierian added the do not merge Not ready or not valid changes label Jan 4, 2026
@Jepvid
Copy link
Contributor Author

Jepvid commented Jan 5, 2026

Should be now proper and not just outright bad

@PurpleHato
Copy link
Member

Thank you for fixing it Reppan, it was one of my first enhancements and probably still one of my favourite 💜

(Player_GetMeleeWeaponHeld2(this) != 0)))) {
(Player_GetMeleeWeaponHeld2(this) != 0))) ||
((commonType + FIDGET_SWORD_SWING == FIDGET_SWORD_SWING) &&
Player_HoldsTwoHandedWeapon(this))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this part necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. i have tried to remove it but without it 2handed idle animation just will not play

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My hunch is this is likely due to my other comment about the VB part being wrong

if ((commonType + FIDGET_SWORD_SWING == FIDGET_SWORD_SWING) &&
Player_HoldsTwoHandedWeapon(this) &&
CVarGetInteger(CVAR_ENHANCEMENT("TwoHandedIdle"), 0) == 1) {
//! @bug This code is unreachable.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than remove the original decomp comment, we can add our own explaining the user can opt to fix this bug

}

static void RegisterFidgetIdleOverrides() {
REGISTER_VB_SHOULD(VB_TWO_HANDED_FIDGET_IDLE, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use COND_VB_SHOULD here

REGISTER_VB_SHOULD(VB_TWO_HANDED_FIDGET_IDLE, {
// Only allow the two-handed fidget when the toggle is enabled; otherwise keep vanilla behavior.
if (*should) {
*should = CVarGetInteger(CVAR_ENHANCEMENT("TwoHandedIdle"), 0) != 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the original implementation, this should be doing a comparison check with the common type arg

@Jepvid
Copy link
Contributor Author

Jepvid commented Jan 5, 2026

how did i even nuke this one????

@Jepvid Jepvid closed this Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Not ready or not valid changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants