-
Notifications
You must be signed in to change notification settings - Fork 78
/
weapon_zm_mac10.lua
63 lines (48 loc) · 1.33 KB
/
weapon_zm_mac10.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
if SERVER then
AddCSLuaFile()
end
SWEP.HoldType = "ar2"
if CLIENT then
SWEP.PrintName = "MAC10"
SWEP.Slot = 2
SWEP.ViewModelFlip = false
SWEP.ViewModelFOV = 54
SWEP.Icon = "vgui/ttt/icon_mac"
SWEP.IconLetter = "l"
end
SWEP.Base = "weapon_tttbase"
SWEP.Kind = WEAPON_HEAVY
SWEP.WeaponID = AMMO_MAC10
SWEP.builtin = true
SWEP.spawnType = WEAPON_TYPE_HEAVY
SWEP.Primary.Damage = 12
SWEP.Primary.Delay = 0.065
SWEP.Primary.Cone = 0.03
SWEP.Primary.ClipSize = 30
SWEP.Primary.ClipMax = 60
SWEP.Primary.DefaultClip = 30
SWEP.Primary.Automatic = true
SWEP.Primary.Ammo = "SMG1"
SWEP.Primary.Recoil = 1.15
SWEP.Primary.Sound = Sound("Weapon_mac10.Single")
SWEP.AutoSpawnable = true
SWEP.AmmoEnt = "item_ammo_smg1_ttt"
SWEP.UseHands = true
SWEP.ViewModel = "models/weapons/cstrike/c_smg_mac10.mdl"
SWEP.WorldModel = "models/weapons/w_smg_mac10.mdl"
SWEP.idleResetFix = true
SWEP.IronSightsPos = Vector(-8.921, -9.528, 2.9)
SWEP.IronSightsAng = Vector(0.699, -5.301, -7)
SWEP.DeploySpeed = 3
---
-- @ignore
function SWEP:GetHeadshotMultiplier(victim, dmginfo)
local att = dmginfo:GetAttacker()
if not IsValid(att) then
return 2
end
local dist = victim:GetPos():Distance(att:GetPos())
local d = math.max(0, dist - 150)
-- decay from 3.2 to 1.7
return 1.7 + math.max(0, 1.5 - 0.002 * (d ^ 1.25))
end