-
Notifications
You must be signed in to change notification settings - Fork 54
More Bug Fixes + Extra Convars #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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) | ||
|
|
||
| net.Receive("DeathStopSound", function() | ||
| if stopsound:GetBool() then | ||
| return | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
| 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 = { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
|
|
||
|
|
@@ -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) | ||
|
|
||
There was a problem hiding this comment.
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