More movement penalties

This commit is contained in:
Fesiug 2023-12-17 21:34:54 -05:00
parent 2d5db94046
commit f64346f27d
4 changed files with 18 additions and 7 deletions

View File

@ -21,7 +21,7 @@ function SWEP:SecondaryAttack()
end
function SWEP:BFire( hand )
if self:BTable( hand ) then
if self:BTable( hand ) and self:GetAim() == 1 then
local p = self:GetOwner()
local wep_table = self:BTable( hand )
local wep_class = self:BClass( hand )
@ -75,7 +75,7 @@ function SWEP:BFire( hand )
end
end
local bc = { effects = false, damage = true }
local bc = { effects = true, damage = true }
function SWEP:CallFire( hand )
local p = self:GetOwner()
local class = self:BClass( hand )

View File

@ -147,6 +147,8 @@ local fallbackstat = {
["Speed_Aiming"] = 1,
["Speed_Reloading"] = 1,
["Speed_Firing"] = 1,
["Speed_FiringTime"] = 0.2,
["ShootHolsterTime"] = 0,
}
function SWEP:GetStat( hand, stat )

View File

@ -155,6 +155,11 @@ hook.Add( "Move", "Benny_Move", function( ply, mv )
targetspeed = targetspeed * w:GetStat( false, "Speed_Move" )
targetspeed = targetspeed * Lerp( w:GetAim(), 1, w:GetStat( false, "Speed_Aiming" ) )
local st = w:D_GetShotTime( false )
targetspeed = targetspeed * Lerp( math.TimeFraction( st, st+w:GetStat( hand, "Speed_FiringTime" ), CurTime() )>1 and 1 or 0, w:GetStat( false, "Speed_Firing" ), 1 )
mv:SetMaxSpeed( targetspeed )
mv:SetMaxClientSpeed( targetspeed )
end

View File

@ -432,7 +432,7 @@ do -- Handguns
SpreadDecay_RampTime = 0.5,
Speed_Move = 1,
Speed_Aiming = 0.95,
Speed_Aiming = 0.98,
Speed_Reloading = 1,
Speed_Firing = 1,
@ -470,7 +470,7 @@ do -- Handguns
SpreadDecay_RampTime = 0.5,
Speed_Move = 1,
Speed_Aiming = 0.95,
Speed_Aiming = 0.98,
Speed_Reloading = 1,
Speed_Firing = 1,
@ -618,9 +618,10 @@ do -- Handguns
SpreadDecay_RampTime = 0.5,
Speed_Move = 0.95,
Speed_Aiming = 0.88,
Speed_Reloading = 0.88,
Speed_Firing = 0.93,
Speed_Aiming = 0.95,
Speed_Reloading = 0.95,
Speed_Firing = 0.95,
Speed_FiringTime = 0.5,
Features = "firearm",
}
@ -1089,6 +1090,8 @@ do -- Sniper rifles
Sound_MagIn = "Barrett.MagIn",
Sound_Cock = "Barrett.Cock",
ShootHolsterTime = 1,
Delay = (60/140),
Firemodes = FIREMODE_SEMI,
Ammo = 5,
@ -1110,6 +1113,7 @@ do -- Sniper rifles
Speed_Aiming = 0.75,
Speed_Reloading = 0.5,
Speed_Firing = 0.334,
Speed_FiringTime = 1,
Features = "firearm",
}