NSEntity: Respect 'team_no' entity key in all team games to filter out which team can touch what

This commit is contained in:
Marco Cawthorne 2022-06-22 14:58:45 -07:00
parent cf5a4da751
commit 87c706ded7
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 8 additions and 0 deletions

View File

@ -202,6 +202,14 @@ NSEntity::EndTouch(entity eToucher)
void
NSEntity::TouchHandler(void)
{
#ifdef SERVER
if (g_grMode.IsTeamPlay())
if (m_iTeam > 0)
if (m_iTeam != other.team) {
return;
}
#endif
/* start touch in case we haven't */
if (m_beingTouched != true)
StartTouch(other);