Cooler UI, mossberg sound, reload better

This commit is contained in:
Fesiug 2023-12-21 17:22:22 -05:00
parent ae0d2ccca0
commit c6cd283755
10 changed files with 84 additions and 6 deletions

View File

@ -12,6 +12,7 @@ function SWEP:Reload()
self:SendWeaponAnim( ACT_VM_RELOAD )
self:GetOwner():GetViewModel():SetPlaybackRate( 2.5 )
self:SetDelayReload( CurTime() + self:SequenceDuration()/2.5 )
self:SetClip1( self.Primary.ClipSize )
self:SetRefillTime( CurTime() + self:SequenceDuration()/2.5 )
--self:SetClip1( self.Primary.ClipSize )
return true
end

View File

@ -28,4 +28,9 @@ function SWEP:Think()
local up = self:GetDelay() > CurTime()-engine.TickInterval()
self:SetBubbleSpread( math.Approach( self:GetBubbleSpread(), up and 1 or 0, FrameTime()/(up and self.BubbleSpreadUp or self.BubbleSpreadDown) ) )
self:SetBubbleRecoil( math.Approach( self:GetBubbleRecoil(), up and 1 or 0, FrameTime()/(up and self.BubbleRecoilUp or self.BubbleRecoilDown) ) )
if self:GetRefillTime() != -1 and CurTime() >= self:GetRefillTime() then
self:SetClip1( self.Primary.ClipSize )
self:SetRefillTime( -1 )
end
end

View File

@ -76,6 +76,8 @@ function SWEP:SetupDataTables()
self:NetworkVar( "Float", 4, "BubbleSpread" )
self:NetworkVar( "Float", 5, "BubbleRecoil" )
self:NetworkVar( "Int", 0, "BurstCount" )
self:SetRefillTime( -1 )
end
SWEP.m_WeaponDeploySpeed = 10
@ -86,5 +88,6 @@ function SWEP:Deploy()
return true
end
function SWEP:Holster()
self:SetRefillTime( -1 )
return true
end

View File

@ -18,4 +18,17 @@ SWEP.Sound_Fire = {
SWEP.Primary.ClipSize = 60
SWEP.Delay = ( 60 / 700 )
SWEP.DamageClose = 25
SWEP.DamageFar = 13
SWEP.DamageFar = 13
SWEP.BubbleSpreadUp = 2
SWEP.BubbleRecoilUp = 2
SWEP.BubbleSpreadDown = 0.4
SWEP.BubbleRecoilDown = 0.4
SWEP.SpreadStart = 0.1
SWEP.SpreadEnd = 4
SWEP.RecoilUp = 33
SWEP.RecoilSpeed = 60
SWEP.RecoilDistStart = 1
SWEP.RecoilDistEnd = 10

View File

@ -16,7 +16,7 @@ SWEP.Sound_Fire = {
}
SWEP.Primary.ClipSize = 5
SWEP.Delay = ( 60 / 300 )
SWEP.Delay = ( 60 / 180 )
SWEP.MaxBurst = 1
SWEP.DamageClose = 25
SWEP.DamageFar = 13

View File

@ -9,7 +9,11 @@ SWEP.ViewModelFOV = 90
SWEP.WorldModel = "models/weapons/w_shot_m3super90.mdl"
SWEP.ActivePos = Vector( 2, -2, -2 )
SWEP.Sound_Shoot = "weapons/m3/m3-1.wav"
SWEP.Sound_Fire = {
"cnr/weapons/mossberg/fire-01.ogg",
"cnr/weapons/mossberg/fire-02.ogg",
"cnr/weapons/mossberg/fire-03.ogg",
}
SWEP.Primary.ClipSize = 4
SWEP.Delay = ( 60 / 80 )

View File

@ -69,7 +69,27 @@ hook.Add("HUDPaint", "CNR_HUD", function()
surface.SetDrawColor( color_white )
surface.DrawRect( b_x, b_y, b_w, b_h )
draw.SimpleText( "TIME", "CNR_HUD_3", b_x + b, b_y + s(4), color_black, TEXT_ALIGN_LEFT )
draw.SimpleText( string.FormattedTime( -CurTime()*1000, "%02i:%02i"), "CNR_HUD_4", b_x + b, b_y + s(12), color_black, TEXT_ALIGN_LEFT )
local fuckhead = ""
fuckhead = string.FormattedTime( -CurTime()*100, "%02i:%02i")
local bump = 0
for i=1, #fuckhead do
local damnit = b_x + b
local clean = 0
if fuckhead[i] == "1" then
clean = 2
end
draw.SimpleText( fuckhead[i], "CNR_HUD_4", damnit + s(bump) + s(clean), b_y + s(12), color_black, TEXT_ALIGN_LEFT )
if fuckhead[i] == ":" then
bump = bump + 5
else
bump = bump + 12
end
end
end
do
@ -78,6 +98,38 @@ hook.Add("HUDPaint", "CNR_HUD", function()
surface.SetDrawColor( color_white )
surface.DrawRect( b_x, b_y, b_w, b_h )
draw.SimpleText( "$", "CNR_HUD_3", b_x + b, b_y + s(8), color_black, TEXT_ALIGN_LEFT )
draw.SimpleText( "100,000,000", "CNR_HUD_4", b_x + b_w - b, b_y, color_black, TEXT_ALIGN_RIGHT )
local fuckhead = ""
fuckhead = math.Round(CurTime()*100)
fuckhead = string.Comma( fuckhead )
local originalbump = 0
for i=1, #fuckhead do
if fuckhead[i] == "," then
originalbump = originalbump + s(6)
else
originalbump = originalbump + s(12)
end
end
local whatever = b_x + b_w - b - originalbump
local bump = 0
for i=1, #fuckhead do
local damnit = whatever + s(bump)
local clean = 0
if fuckhead[i] == "1" then
clean = 4
elseif fuckhead[i] == "2" then
clean = 0
end
draw.SimpleText( fuckhead[i], "CNR_HUD_4", damnit + s(clean), b_y, color_black, TEXT_ALIGN_LEFT )
if fuckhead[i] == "," then
bump = bump + 6
else
bump = bump + 12
end
end
end
end)

Binary file not shown.

Binary file not shown.

Binary file not shown.