27 lines
641 B
Lua
27 lines
641 B
Lua
|
|
function SWEP:Reload()
|
|
if self:GetDelay() > CurTime() then
|
|
return false
|
|
end
|
|
if self:GetDelayReload() > CurTime() then
|
|
return false
|
|
end
|
|
if self:GetShotgunReloading() == 1 then
|
|
return false
|
|
end
|
|
if self:Clip1() >= self.Primary.ClipSize then
|
|
return false
|
|
end
|
|
|
|
if self.ShotgunReloading then
|
|
self:SendWeaponAnim( ACT_SHOTGUN_RELOAD_START )
|
|
self:GetOwner():GetViewModel():SetPlaybackRate( 2.5 )
|
|
self:SetDelayReload( CurTime() + 0.1 )
|
|
self:SetShotgunReloading( 1 )
|
|
else
|
|
self:SendAnim( "reload" )
|
|
--self:SetDelayReload( CurTime() + animtime*0.9 )
|
|
--self:SetRefillTime( CurTime() + animtime*0.5 )
|
|
end
|
|
return true
|
|
end |