Add scaling for background map pan and lerp - #2125
Open
Rainyan wants to merge 4 commits into
Open
Conversation
Convert the cl_neo_background_pan from boolean on/off option into a float scale for adjusting the pan strength. The CAMERA_MOVEMENT_MULTIPIER remains unchanged, so the default "enabled" value of 1 keeps the same strength as before, for user config compatibility. The max value is capped to prevent users from turning too much, and revealing unmapped areas of the 3D background maps.
Add new cvar `cl_neo_background_lerp` to accompany `cl_neo_background_pan`. The lerp defaults to 1 (i.e. no lerp), but can be lowered to get a softer pan instead of being strictly locked to the cursor position. Lerp value of 0 uses frame interval (to disable the feature entirely, use `cl_neo_background_pan 0`, instead).
Contributor
|
Is it possible to allow negative values so I can finally make the background pan in the correct direction? 👀 |
inverts pan direction
Member
Author
Added support for negative values in 860d531 to flip the pan direction. Unless we want X/Y axes control separated, but maybe this is good enough? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Convert
cl_neo_background_panfrom boolean option into a float scale.Also add an accompanying
cl_neo_background_lerpcvar for controlling the lerp to be used forcl_neo_background_pan, to enable gentler panning movement.When using the cvar defaults, there are no changes introduced to the panning behaviour:
cl_neo_background_pan 1default value remains at the sameCAMERA_MOVEMENT_MULTIPIERpanning strength (used as multiplier ofCAMERA_MOVEMENT_MULTIPIER * cl_neo_background_pan) for client config compatibility.cl_neo_background_lerpalso defaults to1(which "lerps" atA + (B-A)*cl_neo_background_lerp, i.e. it is an uninterpolated plain assignmentA=Bas was the case previously).Toolchain
Linked Issues