Fix incorrect handling of _condition_bits in TF2 extension (#2357)
Some checks failed
Continuous Integration / ${{ matrix.os_short }}-${{ matrix.compiler_cc }} (clang, clang++, ubuntu-latest, linux) (push) Has been cancelled
Continuous Integration / ${{ matrix.os_short }}-${{ matrix.compiler_cc }} (clang-14, clang++-14, ubuntu-22.04, linux) (push) Has been cancelled
Continuous Integration / ${{ matrix.os_short }}-${{ matrix.compiler_cc }} (msvc, windows-latest, win) (push) Has been cancelled
hl2sdk-mock tests / mock (push) Has been cancelled
SourcePawn scripting / build (ubuntu-latest, linux) (push) Has been cancelled
SourcePawn scripting / build (windows-latest, win) (push) Has been cancelled

This commit is contained in:
Bakugo 2025-09-26 14:06:59 +01:00 committed by GitHub
parent e56a1ac2ef
commit 19dce02a9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,25 +57,9 @@ void PlayerConditionsMgr::ProcessCondChange(CondChangeData_t *pCondData)
return;
int client = pCondData->hPlayer.GetEntryIndex();
int newConds = 0;
int prevConds = 0;
CondVar var = pCondData->var;
if (var == m_nPlayerCond)
{
prevConds = m_OldConds[client][_condition_bits] | m_OldConds[client][var];
newConds = m_OldConds[client][_condition_bits] | pCondData->newConds;
}
else if (var == _condition_bits)
{
prevConds = m_OldConds[client][m_nPlayerCond] | m_OldConds[client][var];
newConds = m_OldConds[client][m_nPlayerCond] | pCondData->newConds;
}
else
{
prevConds = m_OldConds[client][var];
newConds = pCondData->newConds;
}
int newConds = pCondData->newConds;
int prevConds = m_OldConds[client][var];
if (prevConds != newConds)
{