[TF2] Re-enable viewmodel sway convars
- Re-enables the convars
cl_wpn_sway_interpandcl_wpn_sway_scaleby:- Removing the
FCVAR_DEVELOPMENTONLYandFCVAR_CHEATflags from them. - Giving them the
FCVAR_ARCHIVEflag. - Clamping their values.
- Changing the default
cl_wpn_sway_scalevalue.
- Removing the
- Also fixes odd movement when using flipped viewmodels
Closes https://github.com/ValveSoftware/Source-1-Games/issues/2120
Showcase using a cl_wpn_sway_scale value of 2.5 (new default):
https://github.com/user-attachments/assets/ed20eef5-643d-4264-8026-d9f015ca66db
Old flipped viewmodels behavior (before fixes):
https://github.com/user-attachments/assets/12b7da19-1404-4b89-9c05-233201402fa5
New behavior
https://github.com/user-attachments/assets/cd253f65-395d-4963-bac8-569185629c52
Needed user_default.scr changes (as suggested by @TorutheRedFox):
"cl_wpn_sway_interp"
{
"#TF_wpn_sway_interp_option"
"#Tooltip_wpn_sway_interp_option"
{ SLIDER 0 0.1 }
{ "0" }
}
"cl_wpn_sway_scale"
{
"#TF_wpn_sway_scale_option"
"#Tooltip_wpn_sway_scale_option"
{ SLIDER 0 5 }
{ "2.5" }
}
you should also add FCVAR_ARCHIVE so it persists, and something similar to the following should also be added to user_default.scr:
"cl_wpn_sway_interp"
{
"#TF_wpn_sway_option"
"#Tooltip_wpn_sway_option"
{ SLIDER 0 0.1 }
{ "0" }
}
~~Note that theres currently some odd behavior when using flipped viewmodels with the sway convars. I'll see how i can fix that~~ Fixed.
The flipped viewmodels bug has been fixed, so i'd say this is safe to merge now 👍