From 4f6f4b2dac08358655a811633a68854becace628 Mon Sep 17 00:00:00 2001 From: zaCade Date: Thu, 19 Jul 2018 14:20:50 +0200 Subject: [PATCH] StopSound: Mute stuff that starts with 'music'. On CSGO most map music seems to start in the music folder, aka count that as music aswell. Doh! --- StopSound/scripting/StopSound.sp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StopSound/scripting/StopSound.sp b/StopSound/scripting/StopSound.sp index a58a175c..b4c449ae 100644 --- a/StopSound/scripting/StopSound.sp +++ b/StopSound/scripting/StopSound.sp @@ -628,7 +628,7 @@ public void OnReloadEffect(DataPack pack) public Action Hook_AmbientSound(char sample[PLATFORM_MAX_PATH], int &entity, float &volume, int &level, int &pitch, float pos[3], int &flags, float &delay) { // Are we playing music? - if(sample[0] != '#') + if(!strncmp(sample, "music", 5, false) && !strncmp(sample, "#", 1, false)) return Plugin_Continue; char sEntity[16];