Status effects in TF2 — burning, crit boosts, Ubercharge, invisibility, stun, and dozens more — are all represented as conditions. Each condition is a value from theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/sr2echa/TF2-Source-Code/llms.txt
Use this file to discover all available pages before exploring further.
ETFCond enum. Active conditions are managed by CTFConditionList, which is embedded in CTFPlayerShared and networked to the client automatically.
The ETFCond enum
ETFCond is declared in game/shared/tf/tf_shareddefs.h. A selection of key values:
| Condition | Value | Effect |
|---|---|---|
TF_COND_AIMING | 0 | Sniper scoped / Heavy spun-up; caps move speed |
TF_COND_DISGUISED | 3 | Spy has an active disguise |
TF_COND_STEALTHED | 4 | Spy is cloaked |
TF_COND_INVULNERABLE | 5 | ÜberCharge active; blocks all damage |
TF_COND_CRITBOOSTED | 11 | Guaranteed crits (Kritzkrieg / revenge) |
TF_COND_STUNNED | 16 | Any stun; check iStunFlags for type |
TF_COND_BURNING | 22 | On fire from Pyro or similar source |
TF_COND_HEALTH_OVERHEALED | 23 | Medic overheal above base HP |
TF_COND_SPEED_BOOST | 32 | Temporary speed increase |
TF_COND_BLASTJUMPING | 80 | In the air from a blast jump; skips landing speed clamp |
TF_COND_MEDIGUN_UBER_BULLET_RESIST | 57 | Vaccinator bullet-resist Über |
TF_COND_MEDIGUN_UBER_BLAST_RESIST | 58 | Vaccinator blast-resist Über |
TF_COND_MEDIGUN_UBER_FIRE_RESIST | 59 | Vaccinator fire-resist Über |
CTFPlayerShared API
Conditions are added, removed, and queried through three methods on CTFPlayerShared (game/shared/tf/tf_player_shared.h):
PERMANENT_CONDITION is defined as -1. Passing it (the default) means the condition lasts until explicitly removed. Any positive value is a duration in seconds.
pProvider is the entity that applied the condition. It is stored on the underlying CTFCondition object and used to credit kills, calculate crit multipliers, and handle edge cases like Medic disconnects.
How conditions are stored and checked
Conditions are managed byCTFConditionList, embedded in CTFPlayerShared:
InCond() checks the _condition_bits bitmask rather than walking _conditions, so condition tests are O(1). The bitmask is a CNetworkVar, meaning it is sent to the client in every delta-compressed network update.
Duration-based vs permanent conditions
EachCTFCondition tracks _max_duration and _min_duration. OnThink() is called every tick to count down the remaining duration and call Remove() when it expires. Some conditions override UsesMinDuration() to enforce a floor — for example CTFCondition_CritBoost prevents the crit boost from being healed or removed before the minimum duration has elapsed:
Network replication
_condition_bits is a CNetworkVar(int, ...) inside CTFConditionList, which is itself declared with DECLARE_EMBEDDED_NETWORKVAR(). The Source DataTable system propagates the bitmask inside DT_TFPlayerShared every time it changes. The client-side OnDataChanged() callback on CTFConditionList diffs the old and new bitmasks to drive visual and audio effects (flame particles, Über glow, cloak shimmer, etc.) without the server needing to send explicit event messages.