fix: flashbang blinds teammates/self when friendly fire is off (master)#839
Merged
Someone-193 merged 1 commit intoMay 31, 2026
Merged
Conversation
The LifeIdentifier check that was added for NW bug #2811 inlined the old `!PreviousOwner.CompareLife(player.ReferenceHub)` condition but dropped the negation, turning `!=` into `==`. UniqueLifeIdentifier is a global per-life counter, so it only matches when `player` is the thrower himself, never for teammates. With `==` the second half of the condition is false for every teammate, the `continue` never runs, and they all get flashed even with FF disabled. Flipping it back to `!=` restores the teammate skip while keeping the LifeIdentifier intent for the NW fix.
Someone-193
approved these changes
May 31, 2026
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
Describe the changes
Fixes an inverted condition in
ExplodingFlashGrenade.ProcessEventthat letflashbangs blind teammates even when friendly fire is disabled.
Same fix as #838, targeted at
masteras requested (by Yamato) so it lands in the currentrelease line too.
What is the current behavior?
The teammate skip checks
instance.PreviousOwner.LifeIdentifier == player.Footprint.LifeIdentifier.UniqueLifeIdentifieris a global per-life counter, so that only matches whenplayeris the thrower himself, never a teammate. Thecontinuethereforenever runs for teammates and they get flashed with FF off.
This came from inlining the old
!instance.PreviousOwner.CompareLife(player.ReferenceHub)check.
CompareLifeisLifeIdentifier == other...UniqueLifeIdentifier, so therewrite dropped the negation and turned
!=into==.What is the new behavior?
Flipped back to
!=, so the condition is true for every teammate again and theyare correctly skipped. The LifeIdentifier comparison stays in place, so the
NW #2811 fix intent is preserved.
Does this PR introduce a breaking change?
No.
Other information:
One-character logic fix, only affects flashbang targeting while
Server.FriendlyFireis off.Types of changes
Submission checklist
Patches (if there are any changes related to Harmony patches)
Other