File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed
Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -109,13 +109,6 @@ void MRecipientFilter::AddAllPlayers()
109109 continue ;
110110 }
111111
112- // Get and compare the classnames. Skip non-player
113- // entities.
114- const char * classname = pPlayer->GetClassName ();
115- if ( strcmp (classname, " player" ) != 0 ) {
116- continue ;
117- }
118-
119112 m_Recipients.AddToTail (i);
120113 }
121114}
@@ -130,14 +123,9 @@ void MRecipientFilter::AddRecipient(int iPlayer)
130123 if (!pPlayer)
131124 return ;
132125
133- // Get and compare the classnames. Skip non-player
134- // entities.
135- const char * classname = pPlayer->GetClassName ();
136- if ( strcmp (classname, " player" ) != 0 ) {
137- return ;
138- }
139-
140- m_Recipients.AddToTail (iPlayer);
126+ // Skip non-player entities.
127+ if (iPlayer > WORLD_ENTITY_INDEX && iPlayer <= gpGlobals->maxClients )
128+ m_Recipients.AddToTail (iPlayer);
141129}
142130
143131void MRecipientFilter::RemoveRecipient ( int iPlayer )
You can’t perform that action at this time.
0 commit comments