diff --git a/lua/arccw/client/cl_convars.lua b/lua/arccw/client/cl_convars.lua index 6fe8a4b7..4ebfa6a7 100644 --- a/lua/arccw/client/cl_convars.lua +++ b/lua/arccw/client/cl_convars.lua @@ -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 }, diff --git a/lua/arccw/client/cl_languages/en.lua b/lua/arccw/client/cl_languages/en.lua index 66e33662..b70081ca 100644 --- a/lua/arccw/client/cl_languages/en.lua +++ b/lua/arccw/client/cl_languages/en.lua @@ -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?" \ No newline at end of file +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." \ No newline at end of file diff --git a/lua/arccw/client/cl_menus.lua b/lua/arccw/client/cl_menus.lua index 0ddaf81a..eae00d7a 100644 --- a/lua/arccw/client/cl_menus.lua +++ b/lua/arccw/client/cl_menus.lua @@ -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" }, diff --git a/lua/weapons/arccw_base/sh_customize.lua b/lua/weapons/arccw_base/sh_customize.lua index 069186ef..ccbfebdd 100644 --- a/lua/weapons/arccw_base/sh_customize.lua +++ b/lua/weapons/arccw_base/sh_customize.lua @@ -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 diff --git a/lua/weapons/arccw_base/sh_firing.lua b/lua/weapons/arccw_base/sh_firing.lua index ed4ba67c..9c32c3db 100644 --- a/lua/weapons/arccw_base/sh_firing.lua +++ b/lua/weapons/arccw_base/sh_firing.lua @@ -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 diff --git a/lua/weapons/arccw_base/sh_think.lua b/lua/weapons/arccw_base/sh_think.lua index c78d5280..0f569d15 100644 --- a/lua/weapons/arccw_base/sh_think.lua +++ b/lua/weapons/arccw_base/sh_think.lua @@ -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 diff --git a/lua/weapons/arccw_base/shared.lua b/lua/weapons/arccw_base/shared.lua index e55be0be..3727cc81 100644 --- a/lua/weapons/arccw_base/shared.lua +++ b/lua/weapons/arccw_base/shared.lua @@ -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" diff --git a/sound/weapons/arccw/bipod_down.wav b/sound/weapons/arccw/bipod_down.wav new file mode 100644 index 00000000..a3ed3edc Binary files /dev/null and b/sound/weapons/arccw/bipod_down.wav differ diff --git a/sound/weapons/arccw/bipod_up.wav b/sound/weapons/arccw/bipod_up.wav new file mode 100644 index 00000000..fcedf673 Binary files /dev/null and b/sound/weapons/arccw/bipod_up.wav differ diff --git a/sound/weapons/arccw/melee_hitworld.wav b/sound/weapons/arccw/melee_hitworld.wav new file mode 100644 index 00000000..83f7ce2a Binary files /dev/null and b/sound/weapons/arccw/melee_hitworld.wav differ diff --git a/sound/weapons/arccw/melee_lift.wav b/sound/weapons/arccw/melee_lift.wav new file mode 100644 index 00000000..1c0a5388 Binary files /dev/null and b/sound/weapons/arccw/melee_lift.wav differ diff --git a/sound/weapons/arccw/melee_miss.wav b/sound/weapons/arccw/melee_miss.wav new file mode 100644 index 00000000..fa4984e8 Binary files /dev/null and b/sound/weapons/arccw/melee_miss.wav differ