[TF2] Allow set_scattergun_has_knockback attribute to take on values greater than 1#772
Open
FlaminSarge wants to merge 1 commit into
Open
[TF2] Allow set_scattergun_has_knockback attribute to take on values greater than 1#772FlaminSarge wants to merge 1 commit into
FlaminSarge wants to merge 1 commit into
Conversation
Contributor
Author
|
@wgetJane let me know if I missed anything/messed up on this |
Contributor
|
looks good |
10ef6ca to
9e760b8
Compare
a02ec00 to
b062119
Compare
b062119 to
a6b76f2
Compare
…r than 1 Also fixes issue where values of -1 could prevent regular downwards damage force while not providing the attribute knockback
a6b76f2 to
cf4c336
Compare
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.
This increases the number of times self-knockback may be applied via the attribute.
This also changes m_bScattergunJump to m_iScattergunJump and updates any relevant code accordingly.
Changes CTFPlayerShared's bool m_bScattergunJump to int m_iScattergunJump.
Renames CTFScattergun's HasKnockback to GetKnockbackCount to return the attribute value directly.
Changes all usages of HasKnockback to
GetKnockbackCount() > 0Changes CTFScatterGun's FireBullet knockback logic to compare the value of m_iScattergunJump to GetKnockbackCount in order to determine whether to apply self-knockback.
Changes CanScatterGunKnockBack in tf_weapon_shotgun to be consistent with elsewhere on
> 0check, fixing an issue where values of -1 could cause the regular-damage-zero-z-force behavior but not actually apply the extra knockback.This version of the PR includes #682 for easy rebasing/inclusion in projects that already include that PR.Rebased onto master now that the above PR is included in master.
Should be demo-safe.
Implements mastercomfig/tf2-patches-old#462