Repository navigation
Award Collateral only for one bullet from one gun, not a shotgun shell [patch] - #96
Open
matt-edmondson wants to merge 1 commit into
Open
matt-edmondson wants to merge 1 commit into
matt-edmondson wants to merge 1 commit into
Conversation
…l [patch] Collateral fired on any second kill by the same attacker in one server tick: one shotgun shell killing two enemies, or a molotov finishing one enemy as a rifle killed another. RoundTracker now counts kills on a tick per weapon, and Collateral takes the GunNotShotgun filter that Point blank and One tap already use. Fixes #94 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW5PUccwNk8Pndsg92E
Contributor
Author
|
CI is red, but the cause is already on
This PR doesn't touch the Site. #85 fixes the build, and with its package change applied locally this branch's full suite passes (742 passed, 7 skipped). The plugin build also fails on Generated by Claude Code |
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.
Fixes #94
What changed
Collateral ("Kill two players with one bullet") fired whenever the same attacker got a second kill in one server tick, with any weapon. Two cases were wrongly awarded:
Fixes:
RoundTracker.RegisterKilltakes the weapon key as a new optional last parameter.KillsWithThisBulletnow counts only same-tick kills with the same weapon.CombatHandlers.CreditKillresolves the weapon before callingRegisterKill(it used to resolve it just after) and passes its key in.GunNotShotgun, matching Point blank and One tap.Spray transfer's
KillsWithThisBullet < 2check only becomes more precise with this change.Tests
TrackerTests.KillsOnTheSameTickWithDifferentWeaponsAreNotOneBullet: molotov then AK on one tick gives 1, and a second AK kill on that tick gives 2.SkillShotTests.SituationalKills: an AK withKillsWithThisBullet = 2still earns Collateral, and a Nova does not.Note:
maindoesn't build at the moment, so CI here will fail until those fixes land:ConVarobsolete #83, fixed by Read the game-mode and teammate cvars through the typed ConVar<T> API [patch] #86). With CS0618 suppressed, the plugin builds cleanly with this change.Open PR #79 also edits multi-kill tracking. It may need a small rebase in
RoundTrackerdepending on which PR merges first.Generated by Claude Code