nosoop / SM-TFAttributeSupport

A SourceMod plugin that improves support for official TF2 attributes.
GNU General Public License v3.0
12 stars 4 forks source link

Fix for "Set DamageType Ignite" #1

Closed SoulBlast35 closed 3 years ago

SoulBlast35 commented 3 years ago

The "Set DamageType Ignite" attribute has been broken since the changes to Pyro in Jungle Inferno. It now only properly works on the Cow Mangler, weapons with the class "tf_weapon_fireaxe" and Miniguns with the Ring of Fire attribute. Is it possible to fix this?

nosoop commented 3 years ago

Ah, yeah. This is an issue with most weapons not having an initial afterburn duration (all the weapons you've mentioned + Huntsman being the only exceptions). That change was introduced in JI alongside the flamethrower rework.

It might be a simple matter of hooking that function and returning a more reasonable default if the attribute is present.

nosoop commented 3 years ago

I have human things to do, but I should have a commit pushed out later today / tomorrow that resolves this; have to stash some other changes that aren't release ready yet.

The plan is to reuse Set DamageType Ignite and treat the value as the afterburn duration. Any value above 1 should be fine since the game just tests that the value is non-zero (after integer conversion). That should produce something similar to the pre-JI static afterburn duration.

nosoop commented 3 years ago

Fixed; the value of Set DamageType Ignite is repurposed to provide the duration of the afterburn in seconds on weapons that don't normally support it — things like the SVF should use their default ignition times. Tested on Linux, but the behavior should be the same on Windows since the hooks are virtual. Thanks for the report!