-
Notifications
You must be signed in to change notification settings - Fork 102
Fix Flashbang & HE #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Flashbang & HE #270
Conversation
| // Only check friendlyFire if the FootPrint hasn't changed (Fix for Grenade not dealing damage because it's from a dead player) | ||
| // TODO rework FriendlyFireRule to make it compatible with Footprint | ||
| if (!attackerFootprint.Equals(new Footprint(attackerFootprint.Hub))) | ||
| if (!attackerFootprint.CompareLife(new Footprint(attackerFootprint.Hub))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes grenades
| if ((instance.transform.position - player.Position).sqrMagnitude >= distance) | ||
| continue; | ||
| if (!ExiledEvents.Instance.Config.CanFlashbangsAffectThrower && instance.PreviousOwner.LifeIdentifier != new Footprint(referenceHub).LifeIdentifier) | ||
| if (!ExiledEvents.Instance.Config.CanFlashbangsAffectThrower && instance.PreviousOwner.CompareLife(player.ReferenceHub)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes flashbangs
| { | ||
| List<Player> targetToAffect = ListPool<Player>.Pool.Get(); | ||
| foreach (ReferenceHub referenceHub in ReferenceHub.AllHubs) | ||
| foreach (Player player in Player.List) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is technically better since we call Player.Get() immediately after
Description
Describe the changes
Fix
What is the current behavior? (You can also link to an open issue here)
What is the new behavior? (if this is a feature change)
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information:
Types of changes
Submission checklist
Patches (if there are any changes related to Harmony patches)
Other