From af2142d70b1fa70d5a987aa8cbeb84d61e424e95 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 14 Dec 2007 05:54:36 +0000 Subject: [PATCH] fixed amb1282 - elev1.wav is cstrike only --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401797 --- plugins/basefuncommands.sp | 9 +++++++++ plugins/basefuncommands/beacon.sp | 11 +++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/plugins/basefuncommands.sp b/plugins/basefuncommands.sp index 11694dd1..3e10caf1 100644 --- a/plugins/basefuncommands.sp +++ b/plugins/basefuncommands.sp @@ -50,6 +50,7 @@ public Plugin:myinfo = new Handle:hTopMenu = INVALID_HANDLE; new g_SlapDamage[MAXPLAYERS+1]; +new bool:g_cstrike = false; #include "basefuncommands/slay.sp" #include "basefuncommands/burn.sp" @@ -73,6 +74,14 @@ public OnPluginStart() { OnAdminMenuReady(topmenu); } + + decl String:folder[64]; + GetGameFolderName(folder, sizeof(folder)); + + if (strcmp(folder, "cstrike") == 0) + { + g_cstrike = true; + } } public OnMapStart() diff --git a/plugins/basefuncommands/beacon.sp b/plugins/basefuncommands/beacon.sp index fdfc4c08..3eb8c7df 100644 --- a/plugins/basefuncommands/beacon.sp +++ b/plugins/basefuncommands/beacon.sp @@ -50,7 +50,10 @@ SetupBeacon() g_BeaconRoundEndHooked = true; } - PrecacheSound("ambient/tones/elev1.wav", true); + if (g_cstrike) + { + PrecacheSound("ambient/tones/elev1.wav", true); + } g_BeamSprite = PrecacheModel("materials/sprites/laser.vmt"); g_HaloSprite = PrecacheModel("materials/sprites/halo01.vmt"); @@ -132,7 +135,11 @@ public Action:Timer_Beacon(Handle:timer, any:client) CreateTimer(0.2, Timer_Beacon, client); GetClientEyePosition(client, vec); - EmitAmbientSound("ambient/tones/elev1.wav", vec, client, SNDLEVEL_RAIDSIREN); + + if (g_cstrike) + { + EmitAmbientSound("ambient/tones/elev1.wav", vec, client, SNDLEVEL_RAIDSIREN); + } } return Plugin_Handled;