Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SWEP:ShotgunReload( status )
- if IsValid( self.Owner ) then
- local Status = math.floor( status or 0 )
- local StartSGReload = 0
- local IsSGReloading = 1
- local EndSGReload = math.ceil( 2 )
- print( "Status is: " .. Status )
- if Status <= StartSGReload then
- self:SendWeaponAnim( ACT_SHOTGUN_RELOAD_START )
- self.ActionDelay = CurTime() + self.Owner:GetViewModel():SequenceDuration()
- self:SetNextPrimaryFire(CurTime() + self.Owner:GetViewModel():SequenceDuration())
- self:SetNextSecondaryFire(CurTime() + self.Owner:GetViewModel():SequenceDuration())
- self:Set_IsShotgunReloading( true )
- Status = IsSGReloading
- self:ShotgunReload( Status )
- end
- if Status == IsSGReloading then
- self:SendWeaponAnim(ACT_VM_RELOAD)
- self.ActionDelay = CurTime() + self.Owner:GetViewModel():SequenceDuration()
- self:SetNextPrimaryFire(CurTime() + self.Owner:GetViewModel():SequenceDuration())
- self:SetNextSecondaryFire(CurTime() + self.Owner:GetViewModel():SequenceDuration())
- self:SetClip1(self:Clip1() + 1)
- self.Owner:RemoveAmmo( 1, self.Primary.Ammo )
- end
- if self:Clip1() >= ( self.Primary.ClipSize + self.Primary.ClipSizePlus ) then
- Status = EndSGReload
- self:ShotgunReload( Status )
- end
- if Status >= EndSGReload then
- self:SendWeaponAnim( ACT_SHOTGUN_RELOAD_FINISH )
- self.ActionDelay = CurTime()
- self:Set_IsShotgunReloading( false )
- self:SetNextPrimaryFire(CurTime() + self.Owner:GetViewModel():SequenceDuration())
- self:SetNextSecondaryFire(CurTime() + self.Owner:GetViewModel():SequenceDuration())
- self:Set_IsReloading( false )
- return false
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement