Pending [Duel] Block healing snipers (1 Viewer)

Do you want to install that plugin in the Duel server?

  • Yes.

    Votes: 8 100.0%
  • No.

    Votes: 0 0.0%

  • Total voters
    8
  • Poll closed .
Status
Not open for further replies.

Evert

Active Member
Joined
Jan 10, 2017
Messages
49
So a while ago the new rule prohibiting medics from healing snipers in spawn was added to duel.
Couple of weeks after, I made a plugin that blocks medics from healing snipers completely.

I showed it to @fanthom but decided it wasn't really worth posting here.

Until recently when he told me how any people keep ignoring this rule.

The plugin currently has two modes controlled by a convar:
  1. First mode: blocks all medic healing (medigun, crossbow...) while sniper is holding primary weapon.
  2. Second mode: blocks all medic healing, whatever weapon the sniper is holding.
All other sources of health are (should be) unaffected.

ConVar:
  • denyheal_block_all_healing: 0(default) for first mode - 1 for second mode

The sourcecode and compiled plugin can be found here

! The plugin requires TF2Attributes to be installed !


Looking forward to your responses :)

@fanthom @Gardevoir @The Death Stalker
@Annie @MiroSlave

One more thing: I have only tested this on the current duel map using bots, with the old rtd plugin installed. So this might need some kind of trial period.
 
Well if it works that would be just awesome ! No more machina-dds-vacc pain in *ss :') Good job Vert~
 
  • Like
Reactions: Evert
I'd love to see the plugin on duel, but I want to add.
That we should add a reminder for snipers and medics, because new players probably won't know about it, so they will ask in chat or something. We could add a reminder for medics : You cannot heal snipers while they are holding their primary weapon and for snipers : Medics can't heal you while you are holding your primary weapon(for example). And players will know why they cannot heal or why they cannot be treated.
 
  • Agree
Reactions: Evert
Wouldn't it make sense to only block healing when the sniper is in spawn since that's what the rule says?
 
Last edited:
Wouldn't it make sense to only block healing when the sniper is in spawn?
Here's the thing: whenever I try to remove the attribute from the player entity (second mode), the change only takes effect after respawning.
Haven't tried it using weapon entities yet. I'll test right now.
 
Oh right it's a weapon attribute, thought it was a hook. Should be doable with hooks.
 
Oh right it's a weapon attribute, thought it was a hook. Should be doable with hooks.
I tried a lot of stuff like m_iMaxBuffedHealth offset, and hooked tf2 events. Or just ignoring medic's ATTACK2 cmd when aiming at a sniper.
Even tried changing medigun's patient offset, but that got fucked results.

If you're referring to DHooks, the thought crossed my mind, but you'd have to find your own signatures to game funcs iirc.

Edit: Just tried removing the attribute from weapons, seems to work. Now I need to check if a player is in spawn, and add/remove attribs accordingly.
 
Last edited:
  • Creative
  • Like
Reactions: fanthom and Bass
Update:
Managed to get it working! Thanks for mentioning hooks, @klay , using SDKhooks :)

The plugin now behaves the following way:

  • Snipers inside the spawnroom will not be able to receive heals from medics
  • Snipers outside the spawnroom will be able to receive heals from medics
I changed the files on dropbox but didn't bother to change the version, since it's not installed yet.
The code could use some cleaning but I'm tired and going to sleep.
 
  • Like
Reactions: fanthom
Im guessing we are classifying the "spawn room" as "func_respawnroom" which will be useless on trade and if the new map for duel gets accepted also.


The func_respawnroom is pretty much where you can change class without dying etc.
 
Im guessing we are classifying the "spawn room" as "func_respawnroom" which will be useless on trade and if the new map for duel gets accepted also.


The func_respawnroom is pretty much where you can change class without dying etc.
Best I can do right now is upload the old version of the plugin as well.
I thought about checking if snipers are within range of spawnroomvisualisers but the current duel map doesn't have one at the main gate.
 
Since I can't change my original post, I'll have to clarify in this comment:
The plugin no longer behaves as stated above;

It now blocks overhealing snipers everywhere on the map, regardless of the weapon they're holding.

I used to have a ConVar controlling whether the blocking occurs only while holding sniper rifle or not, but I removed it since it seemed pointless.

Latest version: 2.0 (updated today)
 
  • Like
Reactions: BlackY and fanthom
I'll give this thread a little bump since the poll closed last Sunday... and also because the suggestion was made 4 months ago...
So what's the status?
 
  • Like
Reactions: fanthom
Sorry for the delay. I have added on To Do list.

Task #72
 
Last edited by a moderator:
  • Like
Reactions: Evert
Status
Not open for further replies.

Users who are viewing this thread