Skip to content

Comments

[TF2] Allow TF_COND_INVULNERABLE_HIDE_UNLESS_DAMAGED to function outside MvM#1794

Open
FlaminSarge wants to merge 1 commit intoValveSoftware:masterfrom
FlaminSarge:invuln-hide
Open

[TF2] Allow TF_COND_INVULNERABLE_HIDE_UNLESS_DAMAGED to function outside MvM#1794
FlaminSarge wants to merge 1 commit intoValveSoftware:masterfrom
FlaminSarge:invuln-hide

Conversation

@FlaminSarge
Copy link
Contributor

@FlaminSarge FlaminSarge commented Feb 7, 2026

Description

This allows TF_COND_INVULNERABLE_HIDE_UNLESS_DAMAGED to display its effects properly outside MvM (shows Ubercharge skin when damaged). In order to prevent networking data when not necessary, it only sets m_flMvMLastDamageTime for players that have the condition (this netprop is not used for any other feature in the game).
In addition, it also adds the relevant logic to C_TFPlayer::IsOverridingViewmodel and C_TFPlayer::DrawOverriddenViewmodel so that a player's viewmodels gain the same effect (only showing the Uber skin when taking damage, instead of live behavior of showing it at all times).

Demonstration: https://youtu.be/ospEI-UsMTY

…ide MvM

Also make viewmodels respect its behavior
@FlaminSarge
Copy link
Contributor Author

FlaminSarge commented Feb 16, 2026

Note that the netprop and related methods haven't been renamed, despite no longer being MvM-specific, to maintain compatibility.

@GrubPL
Copy link

GrubPL commented Feb 16, 2026

Maybe this will be merged as part of the mvm update?
I guess we'll just have to wait and see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants