From 6619c066e49d803727720b23aa790f54fd125f39 Mon Sep 17 00:00:00 2001 From: icedream Date: Sat, 21 Dec 2013 00:33:15 +0100 Subject: [PATCH] Fix ammo system deactivation issue. --- lua/weapons/disguiser/cl_fxfake.lua | 2 -- lua/weapons/disguiser/cl_init.lua | 1 - lua/weapons/disguiser/sh_init.lua | 15 +++++++-------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/lua/weapons/disguiser/cl_fxfake.lua b/lua/weapons/disguiser/cl_fxfake.lua index d5803fb..73fb02b 100644 --- a/lua/weapons/disguiser/cl_fxfake.lua +++ b/lua/weapons/disguiser/cl_fxfake.lua @@ -26,8 +26,6 @@ */ usermessage.Hook("disguiserShootFX", function(um) - print("[Disguiser] Received disguiserShootFX") - local hitpos = um:ReadVector() local hitnormal = um:ReadVectorNormal() local entity = um:ReadEntity() diff --git a/lua/weapons/disguiser/cl_init.lua b/lua/weapons/disguiser/cl_init.lua index fb52307..e6bf157 100644 --- a/lua/weapons/disguiser/cl_init.lua +++ b/lua/weapons/disguiser/cl_init.lua @@ -34,7 +34,6 @@ include("sh_init.lua") SWEP.PrintName = "Disguiser" SWEP.Slot = 0 SWEP.SlotPos = 1 -SWEP.DrawAmmo = false SWEP.DrawCrosshair = true SWEP.WepSelectIcon = surface.GetTextureID("vgui/gmod_tool" ) SWEP.Gradient = surface.GetTextureID("gui/gradient" ) diff --git a/lua/weapons/disguiser/sh_init.lua b/lua/weapons/disguiser/sh_init.lua index 7e1f4f8..1a271be 100644 --- a/lua/weapons/disguiser/sh_init.lua +++ b/lua/weapons/disguiser/sh_init.lua @@ -37,14 +37,11 @@ SWEP.Instructions = SWEP.Spawnable = true SWEP.AdminSpawnable = true SWEP.UseHands = true -SWEP.ViewModel = "models/weapons/c_toolgun.mdl" // won't be displayed anyways, see Deploy -SWEP.WorldModel = "models/weapons/w_toolgun.mdl" // won't be displayed anyways, see Deploy - -// Precache models -util.PrecacheModel(SWEP.ViewModel) -util.PrecacheModel(SWEP.WorldModel) +SWEP.ViewModel = "models/weapons/c_toolgun.mdl" +SWEP.WorldModel = "models/weapons/w_toolgun.mdl" // Disable ammo system +SWEP.DrawAmmo = false SWEP.Primary.ClipSize = -1 SWEP.Primary.DefaultClip = -1 SWEP.Primary.Automatic = false @@ -54,6 +51,10 @@ SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" +// Precache models +util.PrecacheModel(SWEP.ViewModel) +util.PrecacheModel(SWEP.WorldModel) + // Sounds SWEP.Sounds = { Disguise = { @@ -92,7 +93,6 @@ for soundName, soundPaths in pairs(SWEP.Sounds) do local internalSoundName = "Disguiser." .. soundName for k, soundPath in pairs(soundPaths) do if SERVER then - print("[Disguiser] resource.AddFile(" .. soundPath .. ")") resource.AddFile("sound/" .. soundPath) end if !file.Exists("sound/" .. soundPath, "GAME") then @@ -115,7 +115,6 @@ end function SWEP:DoShootEffect(hitpos, hitnormal, entity, physbone, bFirstTimePredicted) if SERVER then - print("[Disguiser] Triggering disguiserShootFX on client " .. self.Owner:Name()) umsg.Start("disguiserShootFX", self.Owner) umsg.Vector(hitpos) umsg.VectorNormal(hitnormal)