Merge branch 'master' of https://git.unloze.com/UNLOZE/sm-plugins
This commit is contained in:
commit
2496036b35
@ -260,7 +260,11 @@ public EConnect OnClientPreConnectEx(const char[] sName, char sPassword[255], co
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnClientPutInServer(int client)
|
||||
{
|
||||
CreateTimer(g_hCvar_AuthenticationTime.FloatValue, CheckAuth, GetClientSerial(client), TIMER_FLAG_NO_MAPCHANGE);
|
||||
float fAuthenticationTime = g_hCvar_AuthenticationTime.FloatValue;
|
||||
if (fAuthenticationTime == -1.0)
|
||||
return;
|
||||
|
||||
CreateTimer(fAuthenticationTime, CheckAuth, GetClientSerial(client), TIMER_FLAG_NO_MAPCHANGE);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
@ -442,7 +442,7 @@ void ShowStopSoundsSettingsMenu(int client)
|
||||
menu.AddItem("1", sBuffer);
|
||||
|
||||
Format(sBuffer, sizeof(sBuffer), "%T%T", "Map Ambient", client, g_bStopMapAmbient[client] ? "Disabled" : "Enabled", client);
|
||||
menu.AddItem("1", sBuffer);
|
||||
menu.AddItem("2", sBuffer);
|
||||
|
||||
menu.ExitBackButton = true;
|
||||
menu.Display(client, MENU_TIME_FOREVER);
|
||||
@ -630,7 +630,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]))
|
||||
if(owner == client || !g_bStopWeaponSounds[client])
|
||||
{
|
||||
// Keep client.
|
||||
clients[j] = clients[i];
|
||||
@ -658,11 +658,23 @@ public Action Hook_NormalSound_CSGO(int clients[MAXPLAYERS], int &numClients, ch
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
int owner = -1;
|
||||
if(entity > MaxClients)
|
||||
{
|
||||
char sClassname[64];
|
||||
if(GetEntityClassname(entity, sClassname, sizeof(sClassname)))
|
||||
{
|
||||
int projectile = StrContains(sClassname, "_projectile");
|
||||
if(projectile > 0 && projectile == strlen(sClassname) - strlen("_projectile")) // endswith
|
||||
owner = GetEntPropEnt(entity, Prop_Send, "m_hThrower");
|
||||
}
|
||||
}
|
||||
|
||||
int j = 0;
|
||||
for(int i = 0; i < numClients; i++)
|
||||
{
|
||||
int client = clients[i];
|
||||
if(!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