Skip to content
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 Friendly Fire rules #37

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

x3rt
Copy link

@x3rt x3rt commented Aug 4, 2024

Description

Describe the changes
Fixes CheckFriendlyFirePlayerRules to account for when Friendly Fire is enabled

What is the current behavior? (You can also link to an open issue here)
https://discord.com/channels/656673194693885975/1269192577475674213

What is the new behavior? (if this is a feature change)
Friendly Fire rules are respected.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No. Only thing that will change is that Friendly Fire servers will be able to flash their teammates as they are supposed to be able to in base-game. (Just like grenades)

Other information:
I could possibly just return true instead of HitboxIdentity.IsDamageable as it would immediately return true anyways when FriendlyFire is enabled.
Could also replace calls to Server.FriendlyFire || CheckFriendlyFirePlayerRules with just CheckFriendlyFirePlayerRules, but that is up to you.


Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentations

Submission checklist

  • I have checked the project can be compiled
  • I have tested my changes and it worked as expected

Patches (if there are any changes related to Harmony patches)

  • I have checked no IL patching errors in the console

Other

  • Still requires more testing

Misaka-ZeroTwo
Misaka-ZeroTwo previously approved these changes Aug 6, 2024
@Misaka-ZeroTwo
Copy link
Collaborator

Misaka-ZeroTwo commented Aug 6, 2024

@louis1706 @Jesus-QC we should just return true directly?

@Misaka-ZeroTwo Misaka-ZeroTwo dismissed their stale review August 6, 2024 13:11

awaiting opinions

@louis1706 louis1706 added the question Further information is requested label Aug 6, 2024
@Misaka-ZeroTwo
Copy link
Collaborator

dup with #33

@x3rt
Copy link
Author

x3rt commented Aug 6, 2024

dup with #33

Hmm I didn't see this PR.
Unsure why they are returning false though as NW logic is HitboxIdentity.IsDamagable (which would immediately return true when FriendlyFire is enabled)

@iamalexrouse
Copy link

If a PR with these changes already exists, this PR can possibly be closed, otherwise, Is this going to be updated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Events question Further information is requested Transpiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants