mirror of
https://github.com/HaodongMo/ARC-9.git
synced 2025-03-04 03:02:58 -05:00
Peeking sound effect
This commit is contained in:
parent
e7a6361d3a
commit
276384aea1
@ -5,6 +5,19 @@ local lastpressed = false
|
|||||||
local arc9_togglepeek_reset = GetConVar("arc9_togglepeek_reset")
|
local arc9_togglepeek_reset = GetConVar("arc9_togglepeek_reset")
|
||||||
local arc9_togglepeek = GetConVar("arc9_togglepeek")
|
local arc9_togglepeek = GetConVar("arc9_togglepeek")
|
||||||
|
|
||||||
|
local soundin = {
|
||||||
|
name = "firemode",
|
||||||
|
sound = "arc9/cloth_5.ogg",
|
||||||
|
channel = ARC9.CHAN_FIDDLE,
|
||||||
|
volume = 0.3,
|
||||||
|
}
|
||||||
|
local soundout = {
|
||||||
|
name = "firemode",
|
||||||
|
sound = "arc9/cloth_4.ogg",
|
||||||
|
channel = ARC9.CHAN_FIDDLE,
|
||||||
|
volume = 0.3,
|
||||||
|
}
|
||||||
|
|
||||||
function SWEP:ThinkPeek()
|
function SWEP:ThinkPeek()
|
||||||
if !self.dt.InSights then return end
|
if !self.dt.InSights then return end
|
||||||
|
|
||||||
@ -14,10 +27,17 @@ function SWEP:ThinkPeek()
|
|||||||
if arc9_togglepeek:GetBool() then
|
if arc9_togglepeek:GetBool() then
|
||||||
if binding and !lastpressed then
|
if binding and !lastpressed then
|
||||||
self.Peeking = !self.Peeking
|
self.Peeking = !self.Peeking
|
||||||
|
|
||||||
|
self:PlayTranslatedSound(self.Peeking and soundout or soundin)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self.Peeking = binding
|
self.Peeking = binding
|
||||||
|
|
||||||
|
if binding != lastpressed then
|
||||||
|
self:PlayTranslatedSound(self.Peeking and soundout or soundin)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
lastpressed = binding
|
lastpressed = binding
|
||||||
end
|
end
|
BIN
sound/arc9/cloth_4.ogg
Normal file
BIN
sound/arc9/cloth_4.ogg
Normal file
Binary file not shown.
BIN
sound/arc9/cloth_5.ogg
Normal file
BIN
sound/arc9/cloth_5.ogg
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user