Fix ammo system deactivation issue.
parent
46d36fcfef
commit
6619c066e4
|
@ -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()
|
||||
|
|
|
@ -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" )
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue