Skip to content

Fix TF2_OnConditionAdded/Removed breaking after player gains TF_COND_CRITBOOSTED - #2357

Merged
Kenzzer merged 1 commit into
alliedmodders:masterfrom
bakugo:fix-conds
Sep 26, 2025
Merged

Fix TF2_OnConditionAdded/Removed breaking after player gains TF_COND_CRITBOOSTED#2357
Kenzzer merged 1 commit into
alliedmodders:masterfrom
bakugo:fix-conds

Conversation

@bakugo

@bakugo bakugo commented Sep 24, 2025

Copy link
Copy Markdown
Contributor

When detecting cond changes to call TF2_OnConditionAdded/TF2_OnConditionRemoved, the values of the m_nPlayerCond and _condition_bits netprops are merged together when either of them change (_condition_bits is a special legacy netprop that only handles cond 11 TF_COND_CRITBOOSTED). This behavior is not implemented correctly and can break the tracking of some conditions for a client if they gain TF_COND_CRITBOOSTED due to the way the merged value is saved to m_OldConds.

I don't believe this special handling is actually necessary at all. _condition_bits is only used for cond 11, and bit 11 is never set on m_nPlayerCond, so keeping the two props completely separate seems to work fine.

Fixes #840

@Kenzzer
Kenzzer merged commit 19dce02 into alliedmodders:master Sep 26, 2025
4 checks passed
cafeed28 pushed a commit to cafeed28/sourcemod that referenced this pull request Dec 2, 2025
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.

TF2 extension: Certain conditions break condition forwards

2 participants