forked from HaodongMo/ArcCW
C-menu sound toggle, CS+ sound replacements, burst delays only PostBurstDelay
This commit is contained in:
parent
9f6d4c7235
commit
95724b578c
@ -72,6 +72,8 @@ ArcCW.ClientConVars = {
|
||||
["arccw_hud_3dfun_forward"] = { def = 0 },
|
||||
["arccw_hud_size"] = { def = 1 },
|
||||
|
||||
["arccw_cust_sounds"] = { def = 1, desc = "Play sounds when opening and closing the customization menu." },
|
||||
|
||||
["arccw_scope_r"] = { def = 255 },
|
||||
["arccw_scope_g"] = { def = 0 },
|
||||
["arccw_scope_b"] = { def = 0 },
|
||||
|
@ -293,4 +293,7 @@ L["arccw.cvar.mult_crouchrecoil"] = "Crouched Recoil"
|
||||
|
||||
-- 2021-2-19
|
||||
L["arccw.cvar.dev_debug"] = "Debug Menu"
|
||||
L["arccw.cvar.dev_debug.desc"] = "Disabled by default.\nDraws a debug menu over your screen where you can view certain elements blah blah?"
|
||||
L["arccw.cvar.dev_debug.desc"] = "Disabled by default.\nDraws a debug menu over your screen where you can view certain elements blah blah?"
|
||||
|
||||
L["arccw.cvar.attinv_sound"] = "Menu Toggle Sound"
|
||||
L["arccw.cvar.attinv_sound.desc"] = "Sounds for opening and closing the customization menu.\nIf it's really not your thing."
|
@ -130,6 +130,8 @@ local HudPanel = {
|
||||
{ type = "t", text = "#arccw.cvar.font", var = "arccw_font" },
|
||||
{ type = "c", text = "#arccw.cvar.font_info" },
|
||||
|
||||
{ type = "b", text = "#arccw.cvar.attinv_sound", var = "arccw_cust_sounds" },
|
||||
{ type = "c", text = "#arccw.cvar.attinv_sound.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.attinv_hideunowned", var = "arccw_attinv_hideunowned" },
|
||||
{ type = "b", text = "#arccw.cvar.attinv_darkunowned", var = "arccw_attinv_darkunowned" },
|
||||
{ type = "b", text = "#arccw.cvar.attinv_onlyinspect", var = "arccw_attinv_onlyinspect" },
|
||||
|
@ -218,7 +218,7 @@ function SWEP:OpenCustomizeHUD()
|
||||
|
||||
gui.EnableScreenClicker(true)
|
||||
|
||||
surface.PlaySound("weapons/arccw/extra.wav")
|
||||
if GetConVar("arccw_cust_sounds"):GetBool() then surface.PlaySound("weapons/arccw/extra.wav") end
|
||||
|
||||
end
|
||||
|
||||
@ -232,7 +232,7 @@ function SWEP:CloseCustomizeHUD()
|
||||
vrmod.MenuClose( "ArcCW_Customize" )
|
||||
end
|
||||
|
||||
surface.PlaySound("weapons/arccw/extra2.wav")
|
||||
if GetConVar("arccw_cust_sounds"):GetBool() then surface.PlaySound("weapons/arccw/extra2.wav") end
|
||||
end
|
||||
end
|
||||
|
||||
@ -842,7 +842,7 @@ function SWEP:CreateCustomizeHUD()
|
||||
atttrivia:Hide()
|
||||
attslidebox:Hide()
|
||||
atttogglebtn:Hide()
|
||||
surface.PlaySound("weapons/arccw/close.wav")
|
||||
if GetConVar("arccw_cust_sounds"):GetBool() then surface.PlaySound("weapons/arccw/close.wav") end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -7,6 +7,9 @@ function SWEP:CanPrimaryAttack()
|
||||
-- Inoperable
|
||||
if self:GetReloading() then return end
|
||||
|
||||
-- Inoperable, but internally (burst resetting for example)
|
||||
if self:GetWeaponOpDelay() > CurTime() then return end
|
||||
|
||||
-- If we are an NPC, do our own little methods
|
||||
if owner:IsNPC() then self:NPC_Shoot() return end
|
||||
|
||||
@ -321,7 +324,7 @@ function SWEP:PrimaryAttack()
|
||||
|
||||
if self:GetCurrentFiremode().Mode < 0 and self:GetBurstCount() == self:GetBurstLength() then
|
||||
local postburst = (self:GetCurrentFiremode().PostBurstDelay or 0)
|
||||
self:SetNextPrimaryFire(CurTime() + postburst)
|
||||
self:SetWeaponOpDelay(CurTime() + postburst)
|
||||
end
|
||||
|
||||
if (self:GetIsManualAction()) and !(self.NoLastCycle and self:Clip1() == 0) then
|
||||
|
@ -85,8 +85,8 @@ function SWEP:Think()
|
||||
if self:GetCurrentFiremode().Mode < 0 and !self:GetCurrentFiremode().RunawayBurst then
|
||||
local postburst = self:GetCurrentFiremode().PostBurstDelay or 0
|
||||
|
||||
if (CurTime() + postburst) > self:GetNextPrimaryFire() then
|
||||
self:SetNextPrimaryFire(CurTime() + postburst)
|
||||
if (CurTime() + postburst) > self:GetWeaponOpDelay() then
|
||||
--self:SetNextPrimaryFire(CurTime() + postburst)
|
||||
self:SetWeaponOpDelay(CurTime() + postburst)
|
||||
end
|
||||
end
|
||||
|
@ -191,12 +191,12 @@ SWEP.DistantShootSound = nil
|
||||
SWEP.ShootSoundSilenced = "weapons/arccw/m4a1/m4a1-1.wav"
|
||||
SWEP.ShootSoundSilencedLooping = nil
|
||||
SWEP.FiremodeSound = "weapons/arccw/firemode.wav"
|
||||
SWEP.MeleeSwingSound = "weapons/arccw/m249/m249_draw.wav"
|
||||
SWEP.MeleeMissSound = "weapons/iceaxe/iceaxe_swing1.wav"
|
||||
SWEP.MeleeHitSound = "weapons/arccw/knife/knife_hitwall1.wav"
|
||||
SWEP.MeleeSwingSound = "weapons/arccw/melee_lift.wav"
|
||||
SWEP.MeleeMissSound = "weapons/arccw/melee_miss.wav"
|
||||
SWEP.MeleeHitSound = "weapons/arccw/melee_hitworld.wav"
|
||||
SWEP.MeleeHitNPCSound = "physics/body/body_medium_break2.wav"
|
||||
SWEP.EnterBipodSound = "weapons/arccw/m249/m249_coverdown.wav"
|
||||
SWEP.ExitBipodSound = "weapons/arccw/m249/m249_coverup.wav"
|
||||
SWEP.EnterBipodSound = "weapons/arccw/bipod_down.wav"
|
||||
SWEP.ExitBipodSound = "weapons/arccw/bipod_up.wav"
|
||||
SWEP.SelectUBGLSound = "weapons/arccw/ubgl_select.wav"
|
||||
SWEP.ExitUBGLSound = "weapons/arccw/ubgl_exit.wav"
|
||||
|
||||
|
BIN
sound/weapons/arccw/bipod_down.wav
Normal file
BIN
sound/weapons/arccw/bipod_down.wav
Normal file
Binary file not shown.
BIN
sound/weapons/arccw/bipod_up.wav
Normal file
BIN
sound/weapons/arccw/bipod_up.wav
Normal file
Binary file not shown.
BIN
sound/weapons/arccw/melee_hitworld.wav
Normal file
BIN
sound/weapons/arccw/melee_hitworld.wav
Normal file
Binary file not shown.
BIN
sound/weapons/arccw/melee_lift.wav
Normal file
BIN
sound/weapons/arccw/melee_lift.wav
Normal file
Binary file not shown.
BIN
sound/weapons/arccw/melee_miss.wav
Normal file
BIN
sound/weapons/arccw/melee_miss.wav
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user