diff --git a/gamemodes/benny/entities/weapons/benny/sh_firing.lua b/gamemodes/benny/entities/weapons/benny/sh_firing.lua index b56c4ed..43c6ed1 100644 --- a/gamemodes/benny/entities/weapons/benny/sh_firing.lua +++ b/gamemodes/benny/entities/weapons/benny/sh_firing.lua @@ -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 ) diff --git a/gamemodes/benny/entities/weapons/benny/sh_inv.lua b/gamemodes/benny/entities/weapons/benny/sh_inv.lua index a5416d8..299464a 100644 --- a/gamemodes/benny/entities/weapons/benny/sh_inv.lua +++ b/gamemodes/benny/entities/weapons/benny/sh_inv.lua @@ -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 ) diff --git a/gamemodes/benny/gamemode/modules/player/sh_movement_advanced.lua b/gamemodes/benny/gamemode/modules/player/sh_movement_advanced.lua index 9deb346..7ed0d95 100644 --- a/gamemodes/benny/gamemode/modules/player/sh_movement_advanced.lua +++ b/gamemodes/benny/gamemode/modules/player/sh_movement_advanced.lua @@ -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 diff --git a/gamemodes/benny/gamemode/modules/weapons/sh_weapons.lua b/gamemodes/benny/gamemode/modules/weapons/sh_weapons.lua index e2cc3b8..4863570 100644 --- a/gamemodes/benny/gamemode/modules/weapons/sh_weapons.lua +++ b/gamemodes/benny/gamemode/modules/weapons/sh_weapons.lua @@ -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", } @@ -1088,6 +1089,8 @@ do -- Sniper rifles Sound_MagOut = "Barrett.MagOut", Sound_MagIn = "Barrett.MagIn", Sound_Cock = "Barrett.Cock", + + ShootHolsterTime = 1, Delay = (60/140), Firemodes = FIREMODE_SEMI, @@ -1110,6 +1113,7 @@ do -- Sniper rifles Speed_Aiming = 0.75, Speed_Reloading = 0.5, Speed_Firing = 0.334, + Speed_FiringTime = 1, Features = "firearm", }