mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 05:13:02 +05:00
fix piece sing + add instructuins to runnerhands
This commit is contained in:
parent
ae59de3b12
commit
0060d6fd02
2 changed files with 15 additions and 18 deletions
|
@ -5,7 +5,7 @@ if CLIENT then
|
|||
minimalvm = CreateClientConVar("Beatrun_MinimalVM", 1, true, true, "Lowers the running viewmodel", 0, 1)
|
||||
cvarwindsound = CreateClientConVar("Beatrun_Wind", 1, true, false, "Wind noises", 0, 1)
|
||||
|
||||
SWEP.PrintName = "Unarmed"
|
||||
SWEP.PrintName = "Runner Hands"
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 1
|
||||
SWEP.DrawAmmo = false
|
||||
|
@ -19,7 +19,7 @@ end
|
|||
SWEP.Author = "datae"
|
||||
SWEP.Contact = ""
|
||||
SWEP.Purpose = ""
|
||||
SWEP.Instructions = ""
|
||||
SWEP.Instructions = "LMB - Punch\nE + LMB - Overdrive (if enabled)\nRMB + A/D - Sidestep\nRMB while in air - Jump Turn"
|
||||
|
||||
SWEP.BounceWeaponIcon = false
|
||||
SWEP.DrawWeaponInfoBox = false
|
||||
|
@ -408,6 +408,14 @@ local allow_overdrive = CreateConVar("Beatrun_AllowOverdriveInMultiplayer", 0, {
|
|||
function SWEP:PrimaryAttack()
|
||||
local ply = self:GetOwner()
|
||||
|
||||
if ply:GetJumpTurn() and not ply:OnGround() then
|
||||
if CLIENT then
|
||||
return ArmInterrupt("jumpturnflypiecesign")
|
||||
elseif game.SinglePlayer() then
|
||||
return ply:SendLua("ArmInterrupt('jumpturnflypiecesign')")
|
||||
end
|
||||
end
|
||||
|
||||
if ply:KeyDown(IN_USE) and (game.SinglePlayer() or allow_overdrive:GetBool()) then
|
||||
local mult = (ply:InOverdrive() and 1) or 1.25
|
||||
local fovmult = (mult == 1 and 1) or 1.1
|
||||
|
@ -419,16 +427,6 @@ function SWEP:PrimaryAttack()
|
|||
return
|
||||
end
|
||||
|
||||
if ply:GetJumpTurn() and not ply:OnGround() then
|
||||
if CLIENT and IsFirstTimePredicted() then
|
||||
ArmInterrupt(jumpturnflypiecesign)
|
||||
elseif game.SinglePlayer() then
|
||||
ply:SendLua("ArmInterrupt('jumpturnflypiecesign')")
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
if not ply:OnGround() or ply:GetSliding() or ply:GetGrappling() or ply:GetWallrun() ~= 0 or ply:GetJumpTurn() then return end
|
||||
|
||||
local curseq = self:GetSequence()
|
||||
|
|
|
@ -4,7 +4,7 @@ SWEP.SlotPos = 1
|
|||
SWEP.DrawAmmo = false
|
||||
SWEP.DrawCrosshair = true
|
||||
|
||||
SWEP.Author = ""
|
||||
SWEP.Author = "datae"
|
||||
SWEP.Contact = ""
|
||||
SWEP.Purpose = ""
|
||||
SWEP.Instructions = ""
|
||||
|
@ -35,8 +35,6 @@ SWEP.Secondary.DefaultClip = -1
|
|||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.Ammo = "none"
|
||||
|
||||
local ziplines = {}
|
||||
|
||||
function SWEP:SetupDataTables()
|
||||
end
|
||||
|
||||
|
@ -46,6 +44,7 @@ function SWEP:Deploy()
|
|||
end
|
||||
|
||||
function SWEP:Initialize()
|
||||
self.ziplines = {}
|
||||
end
|
||||
|
||||
function SWEP:Think()
|
||||
|
@ -67,14 +66,14 @@ function SWEP:PrimaryAttack()
|
|||
if SERVER then
|
||||
local zip = CreateZipline(ply:EyePos(), ply:GetEyeTrace().HitPos)
|
||||
|
||||
table.insert(ziplines, zip)
|
||||
table.insert(self.ziplines, zip)
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:SecondaryAttack()
|
||||
for k, v in pairs(ziplines) do
|
||||
for _, v in pairs(self.ziplines) do
|
||||
v:Remove()
|
||||
end
|
||||
|
||||
table.Empty(ziplines)
|
||||
table.Empty(self.ziplines)
|
||||
end
|
Loading…
Reference in a new issue