diff --git a/gamemodes/beatrun/gamemode/cl/Death.lua b/gamemodes/beatrun/gamemode/cl/Death.lua index c0aaac63..8c92f0a0 100644 --- a/gamemodes/beatrun/gamemode/cl/Death.lua +++ b/gamemodes/beatrun/gamemode/cl/Death.lua @@ -1,7 +1,9 @@ -local stopsound = CreateClientConVar("Beatrun_StopDeathSound", "1", true, false) +local stopsound = CreateClientConVar("Beatrun_Death_StopSound", "0", true, false) net.Receive("DeathStopSound", function() if stopsound:GetBool() then + return + else RunConsoleCommand("stopsound") end end) diff --git a/gamemodes/beatrun/gamemode/cl/Fall.lua b/gamemodes/beatrun/gamemode/cl/Fall.lua index fc6e6745..57be7f3c 100644 --- a/gamemodes/beatrun/gamemode/cl/Fall.lua +++ b/gamemodes/beatrun/gamemode/cl/Fall.lua @@ -88,10 +88,14 @@ hook.Add("HUDPaint", "FallVignette", function() end) hook.Add("InputMouseApply", "FallLock", function(cmd, x, y, ang) +local BRFallLock = CreateClientConVar("Beatrun_FallLock", "1", true, false) + + if BRFallLock:GetBool() then if LocalPlayer().FallStatic then cmd:SetMouseX(0) cmd:SetMouseY(0) return true end +end end) diff --git a/gamemodes/beatrun/gamemode/sh/Balance.lua b/gamemodes/beatrun/gamemode/sh/Balance.lua index 0f213433..1083e6bc 100644 --- a/gamemodes/beatrun/gamemode/sh/Balance.lua +++ b/gamemodes/beatrun/gamemode/sh/Balance.lua @@ -96,6 +96,10 @@ hook.Add("SetupMove", "Balance", function(ply, mv, cmd) if out.Entity ~= balance and not out.Entity:IsPlayer() or distlen < 25 or distend < distlen + 30 or math.abs(ply:GetBalance()) >= 100 then ParkourEvent("fall", ply) + if CLIENT and IsFirstTimePredicted() or game.SinglePlayer() then + ply:EmitSound("Cloth.Fall") + end + if math.abs(ply:GetBalance()) >= 100 then if CLIENT then BodyAnimSetEase(mv:GetOrigin()) diff --git a/gamemodes/beatrun/gamemode/sh/CrouchJump.lua b/gamemodes/beatrun/gamemode/sh/CrouchJump.lua index c06ca9f7..d3aab356 100644 --- a/gamemodes/beatrun/gamemode/sh/CrouchJump.lua +++ b/gamemodes/beatrun/gamemode/sh/CrouchJump.lua @@ -35,7 +35,7 @@ hook.Add("SetupMove", "CrouchJump", function(ply, mv, cmd) local activewep = ply:GetActiveWeapon() - if ply:Alive() and not ply:GetCrouchJumpBlocked() and not IsValid(ply:GetZipline()) and not IsValid(ply:GetLadder()) and ply:GetClimbing() == 0 and not ply:GetJumpTurn() and ply:GetMantle() == 0 and not ply:OnGround() and ply:GetVelocity().z > -350 and ply:GetCrouchJumpTime() < CurTime() and ply:GetWallrun() == 0 and mv:KeyPressed(IN_DUCK) then + if ply:Alive() and not ply:GetCrouchJumpBlocked() and not IsValid(ply:GetZipline()) and not IsValid(ply:GetLadder()) and not IsValid(ply:GetSwingbar()) and ply:GetClimbing() == 0 and not ply:GetJumpTurn() and ply:GetMantle() == 0 and not ply:OnGround() and ply:GetVelocity().z > -350 and ply:GetCrouchJumpTime() < CurTime() and ply:GetWallrun() == 0 and mv:KeyPressed(IN_DUCK) then if CLIENT then local ang = ply:EyeAngles() ang.x = 0 diff --git a/gamemodes/beatrun/gamemode/sh/Dive.lua b/gamemodes/beatrun/gamemode/sh/Dive.lua index bf46f307..2206a759 100644 --- a/gamemodes/beatrun/gamemode/sh/Dive.lua +++ b/gamemodes/beatrun/gamemode/sh/Dive.lua @@ -31,7 +31,7 @@ local function Dive(ply, mv, cmd) if ply:UsingRH() and ply:GetActiveWeapon():GetQuakeJumping() and totsugeki:GetBool() then if SERVER then if totsugekiaudio:GetBool() then - ply:EmitSound("misc/totsugeki" .. math.random(1, 2) .. ".mp3", 60, 100, 1, CHAN_VOICE) + ply:EmitSound("Dive.Totsugeki", 60, 100, 1, CHAN_VOICE) end local vPoint = mv:GetOrigin() diff --git a/gamemodes/beatrun/gamemode/sh/Sounds_Misc.lua b/gamemodes/beatrun/gamemode/sh/Sounds_Misc.lua index 6bc564d1..078bc0f5 100644 --- a/gamemodes/beatrun/gamemode/sh/Sounds_Misc.lua +++ b/gamemodes/beatrun/gamemode/sh/Sounds_Misc.lua @@ -114,3 +114,12 @@ sound.Add({ pitch = { 90, 110 }, sound = { "mirrorsedge/Ladder/Ladder_Slide_2a.wav" } }) + +sound.Add({ + name = "Dive.Totsugeki", + volume = 1, + level = 60, + channel = CHAN_STATIC, + pitch = 100, + sound = { "misc/totsugeki1.mp3", "misc/totsugeki2.mp3" } +}) diff --git a/gamemodes/beatrun/gamemode/sv/Disarm.lua b/gamemodes/beatrun/gamemode/sv/Disarm.lua index e08d4fb7..f1fba183 100644 --- a/gamemodes/beatrun/gamemode/sv/Disarm.lua +++ b/gamemodes/beatrun/gamemode/sv/Disarm.lua @@ -1,7 +1,38 @@ util.AddNetworkString("DisarmStart") +-- Not the best method to filter out imcompatible NPC rigs. +-- Feel free to replace this with something less janky. +local IgnoreDisarm = { +"npc_antlionguard", +"npc_antlion", +"npc_antlion_worker", +"npc_barnacle", +"npc_vortigaunt", +"npc_headcrab", +"npc_headcrab_fast", +"npc_headcrab_black", +"npc_crow", +"npc_pigeon", +"npc_seagull", +"npc_dog", +"npc_combinedropship", +"npc_combinegunship", +"npc_rollermine", +"npc_manhack", +"npc_hunter", +"npc_helicopter", +"npc_strider", +"npc_combine_camera", +"npc_cscanner", +"npc_clawscanner", +"npc_rocket_turret", +"npc_portal_turret_floor", +"npc_security_camera", +"npc_turret_ceiling", +"npc_turret_floor"} + local function Disarm_Init(ply, victim) - if ply:GetSliding() or ply:GetWallrun() > 0 or ply:GetDive() then return end -- prevents animation bugs and lua errors + if ply:GetSliding() or ply:GetWallrun() > 0 or ply:GetDive() or not ply:OnGround() then return end -- prevents animation bugs and lua errors victim:NextThink(CurTime() + 100) @@ -23,6 +54,8 @@ end local function Disarm(ply, ent) if not GetConVar("Beatrun_Disarm"):GetBool() then return end + if table.HasValue(IgnoreDisarm,ent:GetClass()) then return end + if ent:IsNPC() and not ent.InDisarm then if ply:KeyPressed(IN_USE) then Disarm_Init(ply, ent) diff --git a/sound/misc/totsugeki1.mp3 b/sound/misc/totsugeki1.mp3 index 1b41b25d..d8a3c3a4 100644 Binary files a/sound/misc/totsugeki1.mp3 and b/sound/misc/totsugeki1.mp3 differ diff --git a/sound/misc/totsugeki2.mp3 b/sound/misc/totsugeki2.mp3 index 6bbfec07..121af78a 100644 Binary files a/sound/misc/totsugeki2.mp3 and b/sound/misc/totsugeki2.mp3 differ