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

[HL2MP] Adjust melee hit trace #1089

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

Conversation

speedvoltage
Copy link
Contributor

Issue:
Melee attacks weren't filtering out entities that shouldn't take damage, which leads to situations where melee hits affected immune entities. Additionally, passive entities (like props) weren't getting the right melee damage when neither the attacker nor the victim was a combat character.

Fix:
We added a check to see if an entity can actually be hit by a melee attack before dealing damage, which stops melee strikes from hitting the wrong targets. Now, if neither the attacker nor the victim is a combat character (like NPCs), melee damage is correctly applied to passive entities such as props, making melee interactions with objects in the game more reliable.

► Check if the specific entity can be hit by a melee attack. If the entity cannot be hit, it is ignored.
► If the attacker or the victim is not a combat character (like NPCs), apply the damage to passive entities (like props, objects, etc.).
Bitl added a commit to BitlDevelopmentStudios/source-sdk-2013-bds-base that referenced this pull request Mar 18, 2025
Bitl added a commit to FIREFIGHT-RELOADED/FIREFIGHT-RELOADED-src-sdk-2013 that referenced this pull request Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant