ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
660 stars 76 forks source link

[TF2] Weapons held by invulnerable players don't glow when crit/mini-crit boosted #6271

Open Squid-Eevee opened 3 months ago

Squid-Eevee commented 3 months ago

Currently, if a player is simultaneously invulnerable and crit or mini-crit boosted (most applicable on halloween maps where exiting the underworld often grants both crits and uber simultaneously), the only indication that that player is crit boosted is the electric particles, which can be difficult to see against the player model: A RED Heavy and a BLU Heavy brandishing their Miniguns. They both have Ubercharge and a crit-boost, but the only tell for the latter is the sparks radiating from their guns. The reason for the lack of crit glow is due to missing variables and proxies in the invulnfx_red.vmt and invulnfx_blue.vmt material files, both found in the materials/models/effects directory. The missing properties are as follows:

"$glowcolor"    "1"
"Proxies"
{
    "ModelGlowColor"
    {
        "resultVar" "$glowcolor"
    }
    "Equals"
    {
        "srcVar1"   "$glowcolor"
        "resultVar" "$color2"
    }
    "Equals"
    {
        "srcVar1"   "$glowcolor"
        "resultVar" "$selfillumtint"
    }
}

Adding these missing material properties adds the glow to the materials: The same two Heavies, but their guns are now glowing bright red and blue, indicating a crit-boost. Ditto, but the guns are now glowing much brighter to indicate a mini-crit boost.

Workshop link: https://steamcommunity.com/sharedfiles/filedetails/?id=2934411889

Material files with the fix applied: fixed invulnfx materials.zip

Wosheereal commented 3 months ago

I feel that the effects of the fix is a non-issue.

Squid-Eevee commented 3 months ago

That's fair. I only really mentioned it because TF2C doesn't have the glowing arms issue.