Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion gamemodes/beatrun/gamemode/cl/Death.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
local stopsound = CreateClientConVar("Beatrun_StopDeathSound", "1", true, false)
local stopsound = CreateClientConVar("Beatrun_Death_StopSound", "0", true, false)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the rename? I get the change to "0" by default tho


net.Receive("DeathStopSound", function()
if stopsound:GetBool() then
return

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could just do

if not stopsound:GetBool() then return end
...

else
RunConsoleCommand("stopsound")
end
end)
4 changes: 4 additions & 0 deletions gamemodes/beatrun/gamemode/cl/Fall.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creating a convar inside a hook is a bad idea


if BRFallLock:GetBool() then
if LocalPlayer().FallStatic then
cmd:SetMouseX(0)
cmd:SetMouseY(0)

return true
end
end
end)
4 changes: 4 additions & 0 deletions gamemodes/beatrun/gamemode/sh/Balance.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/beatrun/gamemode/sh/CrouchJump.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gamemodes/beatrun/gamemode/sh/Dive.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
9 changes: 9 additions & 0 deletions gamemodes/beatrun/gamemode/sh/Sounds_Misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
})
35 changes: 34 additions & 1 deletion gamemodes/beatrun/gamemode/sv/Disarm.lua
Original file line number Diff line number Diff line change
@@ -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 = {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use glualint for this project.

"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)

Expand All @@ -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)
Expand Down
Binary file modified sound/misc/totsugeki1.mp3
Binary file not shown.
Binary file modified sound/misc/totsugeki2.mp3
Binary file not shown.