Add "Interaction Distance" config setting#527
Open
bruck-dev wants to merge 5 commits intoNebulousCloud:masterfrom
Open
Add "Interaction Distance" config setting#527bruck-dev wants to merge 5 commits intoNebulousCloud:masterfrom
bruck-dev wants to merge 5 commits intoNebulousCloud:masterfrom
Conversation
1) Standardized all 96 unit interaction checks with a config variable (defaulting to 96 still) that allows for plugins to use a standard scalar for all interaction checks 2) Moved maxHoldDistance to SWEP:Initialize for the ix_hands weapon so it can be set somewhat more dynamically than having it as part of the base class. Won't scale with a new config setting until the player has their loadout re-initialized, but it won't require a server restart
1) Removed intermediate variables I had added for DistSqr math as they were redundant.
1) ix_hands will now automatically heldDistance parameters when the config option is changed, for all players 2) Changed ix_hands' secondary fire ranges to scale with the interact distance. Will still default to 84 when 96 is the maximum distance 3) Set minimum pickup range to 48, as anything below is essentially unusable. Set the max to 96, as ENT:Use() really only fires at 82 units at an engine level, and it doesn't actually let you pick up items
1) Fixed a couple of linter errors about line length. Should probably increase the linter settings, 128 characters is pretty restrictive
1) Shortened interactionDistance to interactRange
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.
Standardized all 96 unit interaction checks with a config variable (defaulting to 96 still) that allows for plugins to use a standard scalar for all interaction checks.
Note that you can't go OVER this value, as ENT:Use() has a hardcoded distance at the engine level of 96 Hammer units (technically 82, but 14 units is not worth dealing with compatibility issues over). I also set a few other literals that were derived from this distance mathematically but not explicitly, such as ix_hands' secondary attack range.
Taken from a handful of other PRs with similar ideas that did not implement it evenly or modified other parameters as well.