mirror of
https://github.com/JonnyBro/beatrun.git
synced 2025-02-07 15:24:10 +05:00
Option to toggle quickturn with any hands only (enabled by default)
This commit is contained in:
parent
c9a73fda50
commit
f3dbf0b2de
2 changed files with 5 additions and 1 deletions
|
@ -224,6 +224,9 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
|
||||||
panel:CheckBox("Quickturn", "Beatrun_QuickturnGround")
|
panel:CheckBox("Quickturn", "Beatrun_QuickturnGround")
|
||||||
panel:ControlHelp("Enables quickturning with secondary attack while on the ground")
|
panel:ControlHelp("Enables quickturning with secondary attack while on the ground")
|
||||||
|
|
||||||
|
panel:CheckBox("Quickturn Hands Only", "Beatrun_QuickturnHandsOnly")
|
||||||
|
panel:ControlHelp("Enables quickturning with \"Runner Hands\" only")
|
||||||
|
|
||||||
panel:CheckBox("Purist Mode", "Beatrun_PuristMode")
|
panel:CheckBox("Purist Mode", "Beatrun_PuristMode")
|
||||||
panel:ControlHelp("Purist mode is a clientside preference that severely weakens the ability to strafe while in the air, which is how Mirror's Edge games handle this.\nDisabled = No restrictions\nEnabled = Reduced move speed in the air")
|
panel:ControlHelp("Purist mode is a clientside preference that severely weakens the ability to strafe while in the air, which is how Mirror's Edge games handle this.\nDisabled = No restrictions\nEnabled = Reduced move speed in the air")
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
QuickturnGround = CreateClientConVar("Beatrun_QuickturnGround", "0", true, true, "Enables quickturning with secondary attack while on the ground", 0, 1)
|
QuickturnGround = CreateClientConVar("Beatrun_QuickturnGround", "0", true, true, "Enables quickturning with secondary attack while on the ground", 0, 1)
|
||||||
|
QuickturnHandsOnly = CreateClientConVar("Beatrun_QuickturnHandsOnly", "1", true, true, "Enables quickturning with \"Runner Hands\" only", 0, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function DoJumpTurn(lookbehind)
|
function DoJumpTurn(lookbehind)
|
||||||
|
@ -55,7 +56,7 @@ end
|
||||||
local standpunch = Angle(-5, 0, 0)
|
local standpunch = Angle(-5, 0, 0)
|
||||||
|
|
||||||
local function Quickturn(ply, mv, cmd)
|
local function Quickturn(ply, mv, cmd)
|
||||||
local keypressed = ply:Alive() and mv:KeyPressed(IN_ATTACK2) and ply:GetActiveWeapon():GetClass() == "runnerhands"
|
local keypressed = ply:Alive() and mv:KeyPressed(IN_ATTACK2) and (ply:GetInfoNum("Beatrun_QuickturnHandsOnly", 0) == 1 and ply:GetActiveWeapon():GetClass() == "runnerhands" or ply:GetInfoNum("Beatrun_QuickturnHandsOnly", 0) == 0)
|
||||||
|
|
||||||
if ply:GetWallrun() ~= 0 then
|
if ply:GetWallrun() ~= 0 then
|
||||||
if mv:KeyDown(IN_BACK) and mv:KeyPressed(IN_JUMP) or ply:GetQuickturn() then
|
if mv:KeyDown(IN_BACK) and mv:KeyPressed(IN_JUMP) or ply:GetQuickturn() then
|
||||||
|
|
Loading…
Reference in a new issue