StopSound: fix minor bug
This commit is contained in:
parent
9605db094d
commit
1fd1248528
@ -518,8 +518,8 @@ public Action Hook_NormalSound_CSS(int clients[MAXPLAYERS], int &numClients, cha
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
int owner = entity;
|
||||
if(owner > MaxClients)
|
||||
int owner = -1;
|
||||
if(entity > MaxClients)
|
||||
{
|
||||
char sClassname[64];
|
||||
if(GetEntityClassname(entity, sClassname, sizeof(sClassname)))
|
||||
@ -534,7 +534,7 @@ public Action Hook_NormalSound_CSS(int clients[MAXPLAYERS], int &numClients, cha
|
||||
for(int i = 0; i < numClients; i++)
|
||||
{
|
||||
int client = clients[i];
|
||||
if(owner == client || (!g_bStopWeaponSounds[client] && IsClientInGame(client)))
|
||||
if(owner == client || (!g_bStopWeaponSounds[client]))
|
||||
{
|
||||
// Keep client.
|
||||
clients[j] = clients[i];
|
||||
|
Loading…
Reference in New Issue
Block a user