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

medigun drains health does not run "on hit" attributes #54

Open
2 tasks done
KenanTheFab opened this issue Nov 17, 2021 · 2 comments
Open
2 tasks done

medigun drains health does not run "on hit" attributes #54

KenanTheFab opened this issue Nov 17, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@KenanTheFab
Copy link

KenanTheFab commented Nov 17, 2021

Initial troubleshooting checklist

  • The attribute is loaded, or this bug report is about a plugin load failure. (Check sm plugins list on the server.)
  • The attribute is the most recent revision.

Describe the bug
The "medigun drains health" attribute appears to not count as a "hit", causing "X on Hit" attributes to not work with it.

To Reproduce
Apply the attribute to a weapon, latch onto an enemy and something like "heal on hit" will not work.

Expected behavior
"medigun drains health" hitting the enemy, not being an invisible leech.

Server environment (please complete the following information):

  • Operating System: [Unsure.]
  • SourceMod version: [1.10 - build 6512]
@KenanTheFab KenanTheFab added the bug Something isn't working label Nov 17, 2021
@nosoop nosoop added enhancement New feature or request and removed bug Something isn't working labels Nov 18, 2021
@nosoop
Copy link
Owner

nosoop commented Nov 18, 2021

Thanks for the report; this one's not quite a bug, rather behavior that wasn't fleshed out since it was for a joke weapon demonstration.

I think this is due to the damage function call not receiving a weapon here:

SDKHooks_TakeDamage(healTarget, medigun, healer, float(damageInflicted),
DMG_PREVENT_PHYSICS_FORCE | DMG_ALWAYSGIB);

But I also vaguely remember the game crashing if the medigun was provided back when it was originally in development, so if that's the case then it won't be that simple of a fix.

@nosoop nosoop changed the title Possible bug? (medigun drains health) medigun drains health does not run "on hit" attributes Nov 18, 2021
@KenanTheFab
Copy link
Author

KenanTheFab commented Nov 18, 2021

Understandable. Could theoretically be caused by an excess amount of damage calls?

I'm not into tf2 modding or w/e, but if that is the case then theoretically you could make it only detect as damage on the initial attachment, make it check every X seconds for a connection, or simply doing a workaround such as..... adding a bleed effect when attached, then allowing the user to change the bleed frequency.

(On a side-note, would love to be able to change how much Uber is gained after a medigun kill.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants