AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
//----------------------------//

// Spawn
function ENT:SpawnFunction( ply, tr )
	if ( !tr.Hit ) then return end
	local SpawnPos = tr.HitPos + tr.HitNormal * 30
	local ent = ents.Create(self.ClassName)
	local angle = ply:GetAimVector():Angle()
	angle = Angle(0,angle.yaw,0)
	//angle:RotateAroundAxis(angle:Up(), 180)
	ent:SetAngles( angle )
	ent:SetPos( SpawnPos )
	ent:Spawn()
	ent:Activate()
	zpizmak.f.SetOwnerID(ent, ply)
	return ent
end
function ENT:Initialize()
	self:SetModel(self.Model)
	self:PhysicsInit( SOLID_VPHYSICS )
	self:SetMoveType( MOVETYPE_VPHYSICS )
	self:SetSolid( SOLID_VPHYSICS )
	self:SetUseType(SIMPLE_USE)
	local phys = self:GetPhysicsObject()
	if (phys:IsValid()) then
		phys:Wake()
		phys:EnableMotion(true)
	end
	self:UseClientSideAnimation()
	self.PhysgunDisabled = true
	self:SetCollisionGroup(COLLISION_GROUP_WEAPON )

end
