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;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
int owner = entity;
|
int owner = -1;
|
||||||
if(owner > MaxClients)
|
if(entity > MaxClients)
|
||||||
{
|
{
|
||||||
char sClassname[64];
|
char sClassname[64];
|
||||||
if(GetEntityClassname(entity, sClassname, sizeof(sClassname)))
|
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++)
|
for(int i = 0; i < numClients; i++)
|
||||||
{
|
{
|
||||||
int client = clients[i];
|
int client = clients[i];
|
||||||
if(owner == client || (!g_bStopWeaponSounds[client] && IsClientInGame(client)))
|
if(owner == client || (!g_bStopWeaponSounds[client]))
|
||||||
{
|
{
|
||||||
// Keep client.
|
// Keep client.
|
||||||
clients[j] = clients[i];
|
clients[j] = clients[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user