NSTrigger: change team touch filter to new field team_no

This commit is contained in:
Marco Cawthorne 2023-06-28 14:18:51 -07:00
parent 31774ce3f1
commit 3cda024a33
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
2 changed files with 5 additions and 3 deletions

View File

@ -132,6 +132,8 @@ private:
int m_iUseType;
int m_iValue;
float team_no;
/* legacy trigger architecture */
float m_flDelay;
#endif

View File

@ -264,7 +264,7 @@ NSTrigger::SpawnKey(string strKey, string strValue)
m_strMaster = strValue;
break;
case "team_no":
team = stof(strValue);
team_no = stof(strValue);
break;
case "delay":
m_flDelay = stof(strValue);
@ -314,8 +314,8 @@ NSTrigger::_TouchHandler(void)
{
#ifdef SERVER
if (g_grMode.IsTeamplay())
if (team > 0i)
if (other.team != team) {
if (team_no > 0i)
if (other.team != team_no) {
return;
}
#endif