Update TF2_IsPlayerInCondition (#712)
* Update TF2_IsPlayerInCondition * Update conditions too
This commit is contained in:
parent
27b69559a3
commit
8807939a14
@ -143,6 +143,7 @@ PlayerConditionsMgr::PlayerConditionsMgr()
|
|||||||
m_CondOffset[m_nPlayerCondEx] = 32;
|
m_CondOffset[m_nPlayerCondEx] = 32;
|
||||||
m_CondOffset[m_nPlayerCondEx2] = 64;
|
m_CondOffset[m_nPlayerCondEx2] = 64;
|
||||||
m_CondOffset[m_nPlayerCondEx3] = 96;
|
m_CondOffset[m_nPlayerCondEx3] = 96;
|
||||||
|
m_CondOffset[m_nPlayerCondEx4] = 128;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlayerConditionsMgr::Init()
|
bool PlayerConditionsMgr::Init()
|
||||||
@ -153,7 +154,8 @@ bool PlayerConditionsMgr::Init()
|
|||||||
&& SetupProp<_condition_bits>("_condition_bits")
|
&& SetupProp<_condition_bits>("_condition_bits")
|
||||||
&& SetupProp<m_nPlayerCondEx>("m_nPlayerCondEx")
|
&& SetupProp<m_nPlayerCondEx>("m_nPlayerCondEx")
|
||||||
&& SetupProp<m_nPlayerCondEx2>("m_nPlayerCondEx2")
|
&& SetupProp<m_nPlayerCondEx2>("m_nPlayerCondEx2")
|
||||||
&& SetupProp<m_nPlayerCondEx3>("m_nPlayerCondEx3");
|
&& SetupProp<m_nPlayerCondEx3>("m_nPlayerCondEx3")
|
||||||
|
&& SetupProp<m_nPlayerCondEx4>("m_nPlayerCondEx4");
|
||||||
|
|
||||||
if (!bFoundProps)
|
if (!bFoundProps)
|
||||||
return false;
|
return false;
|
||||||
|
@ -52,6 +52,7 @@ public:
|
|||||||
m_nPlayerCondEx,
|
m_nPlayerCondEx,
|
||||||
m_nPlayerCondEx2,
|
m_nPlayerCondEx2,
|
||||||
m_nPlayerCondEx3,
|
m_nPlayerCondEx3,
|
||||||
|
m_nPlayerCondEx4,
|
||||||
|
|
||||||
CondVar_Count
|
CondVar_Count
|
||||||
};
|
};
|
||||||
|
@ -581,6 +581,14 @@ stock bool TF2_IsPlayerInCondition(int client, TFCond cond)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
int bit = (1 << (iCond - 128));
|
||||||
|
if ((GetEntProp(client, Prop_Send, "m_nPlayerCondEx4") & bit) == bit)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
ThrowError("Invalid TFCond value %d", iCond);
|
ThrowError("Invalid TFCond value %d", iCond);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user