/*
	Staff Weapon for GarrysMod10
	Copyright (C) 2007  aVoN

	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

--################# HEADER #################
AddCSLuaFile("cl_init.lua");
AddCSLuaFile("shared.lua");
include("shared.lua");
--################# SENT CODE ###############
ENT.HitSound = Sound("weapons/ronon_fadeout.mp3");

--################### Init @aVoN
function ENT:Initialize()
	self.BaseClass.Initialize(self);
	self.Radius = StarGate.CFG:Get("dexgun","radius",50);
	self.Damage = StarGate.CFG:Get("dexgun","damage",150);
	self.MaxPasses = StarGate.CFG:Get("dexgun","maxpasses",5);
	if(self.Phys and self.Phys:IsValid()) then
		self.Phys:SetMass(40);
	end
end

--################### Add some extra sound @aVoN
function ENT:Blast(...)
	self.BaseClass.Blast(self,...);
	WorldSound(self.HitSound,self.Entity:GetPos(),80,math.random(80,120));
end
