function SWEP:MakeOtherModel()
if (CLIENT) then
local vm = self.Owner:GetViewModel()
self.Owner.Decor1 = ClientsideModel("models/weapons/v_pistol.mdl", RENDER_GROUP_VIEW_MODEL_OPAQUE)
self.Owner.Decor1:SetPos(vm:GetPos() + vm:GetRight()*0)
self.Owner.Decor1:SetAngles(vm:GetAngles())
self.Owner.Decor1:SetParent(vm)
self.Owner.Decor1:SetModelScale(Vector(1, 1, 1))
self.Owner.Decor1:SetNoDraw(true)
end
end
function SWEP:ViewModelDrawn()
if (CLIENT) then
if not self.Owner.Decor1 then self:MakeOtherModel() end
if self.Owner.Decor1 then self.Owner.Decor1:DrawModel() end
if LocalPlayer():GetActiveWeapon():GetNWBool("OtherModRePos") then
self.Owner.Decor1:Remove()
self:MakeOtherModel()
end
self.Owner.Decor1:FrameAdvance( RealFrameTime( ) )
if self.Weapon:GetNWBool("SecDraw") then
self.Owner.Decor1:SetSequence(self.Owner.Decor1:LookupSequence("draw"))
self.Owner.Decor1:SetCycle(0)
end
if self.Weapon:GetNWBool("SecIdle") then
self.Owner.Decor1:SetSequence(self.Owner.Decor1:LookupSequence("idle01"))
self.Owner.Decor1:SetCycle(0)
end
if self.Weapon:GetNWBool("SecIdleEmpty") then
self.Owner.Decor1:SetSequence(self.Owner.Decor1:LookupSequence("idle01empty"))
self.Owner.Decor1:SetCycle(0)
end
if self.Weapon:GetNWBool("SecFire") then
self.Owner.Decor1:SetCycle(0)
self.Owner.Decor1:SetSequence(self.Owner.Decor1:LookupSequence("fire"..math.random(1,3)..""))
self.Owner.Decor1:SetCycle(0)
end
if self.Weapon:GetNWBool("SecReload") then
self.Owner.Decor1:SetSequence(self.Owner.Decor1:LookupSequence("reload"))
self.Owner.Decor1:SetCycle(0)
end
end
end