NSTrigger: change team touch filter to new field team_no
This commit is contained in:
parent
31774ce3f1
commit
3cda024a33
2 changed files with 5 additions and 3 deletions
|
@ -132,6 +132,8 @@ private:
|
|||
int m_iUseType;
|
||||
int m_iValue;
|
||||
|
||||
float team_no;
|
||||
|
||||
/* legacy trigger architecture */
|
||||
float m_flDelay;
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue