2018-05-02 06:32:59 +08:00
|
|
|
INC_CLIENT()
|
2014-10-02 08:49:54 +08:00
|
|
|
|
|
|
|
SWEP.DrawCrosshair = false
|
|
|
|
|
|
|
|
SWEP.Slot = 4
|
|
|
|
SWEP.SlotPos = 0
|
|
|
|
|
|
|
|
function SWEP:DrawHUD()
|
2018-05-02 06:32:59 +08:00
|
|
|
if GetConVar("crosshair"):GetInt() ~= 1 then return end
|
2014-10-02 08:49:54 +08:00
|
|
|
self:DrawCrosshairDot()
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:PrimaryAttack()
|
|
|
|
end
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
function SWEP:DrawWeaponSelection(x, y, w, h, alpha)
|
|
|
|
self:BaseDrawWeaponSelection(x, y, w, h, alpha)
|
2014-10-02 08:49:54 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:Think()
|
2018-05-02 06:32:59 +08:00
|
|
|
if self:GetOwner():KeyDown(IN_ATTACK2) then
|
2014-10-02 08:49:54 +08:00
|
|
|
self:RotateGhost(FrameTime() * 60)
|
|
|
|
end
|
2018-05-02 06:32:59 +08:00
|
|
|
if self:GetOwner():KeyDown(IN_RELOAD) then
|
2014-10-02 08:49:54 +08:00
|
|
|
self:RotateGhost(FrameTime() * -60)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:Deploy()
|
2018-05-02 06:32:59 +08:00
|
|
|
gamemode.Call("WeaponDeployed", self:GetOwner(), self)
|
2014-10-02 08:49:54 +08:00
|
|
|
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
|
|
|
local nextclick = 0
|
|
|
|
function SWEP:RotateGhost(amount)
|
|
|
|
if nextclick <= RealTime() then
|
|
|
|
surface.PlaySound("npc/headcrab_poison/ph_step4.wav")
|
|
|
|
nextclick = RealTime() + 0.3
|
|
|
|
end
|
2018-05-02 06:32:59 +08:00
|
|
|
RunConsoleCommand("_zs_ghostrotation", math.NormalizeAngle(GetConVar("_zs_ghostrotation"):GetFloat() + amount))
|
2014-10-02 08:49:54 +08:00
|
|
|
end
|