SM-TFCustomAttributeStarterPack icon indicating copy to clipboard operation
SM-TFCustomAttributeStarterPack copied to clipboard

MvM Attributes "AlwaysCrit" applies Crit boost to all weapons if set on a weapon

Open SoulBlast35 opened this issue 2 years ago • 5 comments

Initial troubleshooting checklist

  • [x ] The attribute is the most recent revision.

Describe the bug If the "MvM Attributes" attribute is used to apply a perma-critboost to a weapon, it will apply the boost to all weapons, but only the Primary weapon will receive the Critical glow.

To Reproduce Apply "MvM Attributes" "AlwaysCrit" to any custom weapon

Expected behavior Only that specific Weapon should be critboosted

Server environment (please complete the following information):

  • Operating System: Windows 10
  • SourceMod version: 1.10.0.6528

Additional context Im not sure if this is intentional or not. The Spy's Knife, will play the Backstab animation on every swing, but doesnt seem to actually crit at all (So we can probably class this as an actual bug rather than an oversight)

SoulBlast35 avatar Mar 08 '22 17:03 SoulBlast35

Ah, I see what code handles this.

I don't remember if the person that requested this plugin specified if AlwaysCrit was supposed to only be active on a given item or applied across the board if any item had it; will review the conversation on it when I have the time.

That said, it does look like the condition being removed on switch is caused by the game, and that would be a bug in any case.

nosoop avatar Mar 12 '22 22:03 nosoop

Yeah, upon review I'm fairly sure mvm attributes is supposed to act as a passive property (the resulting flags is the combined result of the flags on all weapons).

The bug would be critical glows not rendering.

nosoop avatar Mar 13 '22 01:03 nosoop

I have sort of been able to partially fix this myself by changing the TFCond to "CritOnKill", however, it still affects all weapons.

SoulBlast35 avatar Mar 13 '22 02:03 SoulBlast35

it still affects all weapons

That is intentional; the attribute affects the player whether or not the item with the attribute is active or not. addcond while active is likely the preferred attribute for the case when a condition should only be active when a weapon is out.

I've added a note to clarify this in the wiki entry.

nosoop avatar Mar 15 '22 03:03 nosoop

Right, gotcha. But a quick fix for the crit glow not rendering (And the Spy's Knife not working with AlwaysCrit) is to switch to the CritOnKill Condition, since currently, it's using the Phlog Rage condition, which only renders the crit glow on the Primary weapon.

SoulBlast35 avatar Mar 15 '22 16:03 SoulBlast35