function GetScopeTex()
	local cur_r_TexResolution = tonumber( getglobal( "r_TexResolution" ) );
	if( cur_r_TexResolution >= 2 ) then -- lower res texture for low texture quality setting
		return System:LoadImage("Textures/Hud/crosshair/g36_zoom_low.tga");
	else
		return System:LoadImage("Textures/Hud/crosshair/g36_zoom.tga");
	end
end


AG36 = {
	name			= "AG36",
	object		= "Objects/Weapons/ag36/ag36_bind.cgf",
	character	= "Objects/Weapons/ag36/ag36.cgf",

	-- if the weapon supports zooming then add this...
	ZoomActive = 0,												-- initially always 0
	MaxZoomSteps = 2,
	ZoomSteps = { 2, 4 },
	---------------------------------------------------
	PlayerSlowDown = 0.8,									-- factor to slow down the player when he holds that weapon
	---------------------------------------------------
	ActivateSound = Sound:LoadSound("Sounds/Weapons/AG36/agweapact.wav",0,150),	-- sound to play when this weapon is selected
	---------------------------------------------------
	ZoomNoSway=1,
	---------------------------------------------------
	DrawFlare=1,
	---------------------------------------------------

	FireParams ={													-- describes all supported 	firemodes

	--PLASMA-----------------------------
	{
		--no_zoom = 0,								--mod to allow zoom
		FModeActivationTime=1,
		HasCrosshair=1,
		AmmoType="Assault",
		projectile_class="Plasma",
		reload_time=2.5,
		fire_rate=7.0,
		fire_activation=FireActivation_OnPress,
		bullet_per_shot=1,
		bullets_per_clip=10,

		FireSounds = {
			"Sounds/Weapons/ag36/FINAL_GRENADE_MONO.wav",
			"Sounds/Weapons/ag36/FINAL_GRENADE_MONO.wav",
			"Sounds/Weapons/ag36/FINAL_GRENADE_MONO.wav",
		},
		FireSoundsStereo = {
			"Sounds/Weapons/ag36/FINAL_GRENADE_STEREO.wav",
			"Sounds/Weapons/ag36/FINAL_GRENADE_STEREO.wav",
			"Sounds/Weapons/ag36/FINAL_GRENADE_STEREO.wav",

		},
		DrySound = "Sounds/Weapons/S500/dryfire1.wav",
		
		ScopeTexId = GetScopeTex(),						--mod added to get sights
		
		MuzzleFlash = {
			geometry_name = "Objects/weapons/muzzleflash/muzzleflashback.cgf",
			bone_name = "spitfire",
			lifetime = 0.08,
		},

		SoundMinMaxVol = { 255, 4, 2600 },

		LightFlash = {
			fRadius = 3.0,
			vDiffRGBA = { r = 1.0, g = 1.0, b = 0.7, a = 1.0, },
			vSpecRGBA = { r = 1.0, g = 1.0, b = 0.7, a = 1.0, },
			fLifeTime = 0.1,
		},
	},
	



--PROJECTILE PROXIMITY MINE-----------------------------
	{
		no_zoom = 1,
		FModeActivationTime=1,
		HasCrosshair=1,
		AmmoType="AG36Grenade",
		projectile_class="ProjProximityMine",
		reload_time=2.5,
		fire_rate=0.2,															--mod to lay down ground shield
		fire_activation=FireActivation_OnPress,
		bullet_per_shot=1,
		bullets_per_clip=5,													--mod for quick fire

		FireSounds = {
			"Sounds/Weapons/ag36/FINAL_GRENADE_MONO.wav",
			"Sounds/Weapons/ag36/FINAL_GRENADE_MONO.wav",
			"Sounds/Weapons/ag36/FINAL_GRENADE_MONO.wav",
		},
		FireSoundsStereo = {
			"Sounds/Weapons/ag36/FINAL_GRENADE_STEREO.wav",
			"Sounds/Weapons/ag36/FINAL_GRENADE_STEREO.wav",
			"Sounds/Weapons/ag36/FINAL_GRENADE_STEREO.wav",

		},
		DrySound = "Sounds/Weapons/AG36/DryFire.wav",

		SoundMinMaxVol = { 255, 4, 2600 },

		LightFlash = {
			fRadius = 3.0,
			vDiffRGBA = { r = 1.0, g = 1.0, b = 0.7, a = 1.0, },
			vSpecRGBA = { r = 1.0, g = 1.0, b = 0.7, a = 1.0, },
			fLifeTime = 0.1,
		},
	},







	},

		SoundEvents={
		--	animname,	frame,	soundfil{	"reload1",	15,			Sound.LoadSound("Sounds/Weapons/ag36/ag36b_15.wav")},
		{	"reload1",	23,			Sound:LoadSound("Sounds/Weapons/ag36/Ag36b_23.wav",0,150)},
		{	"reload1",	38,			Sound:LoadSound("Sounds/Weapons/ag36/Ag36b_38.wav",0,150)},
		{	"reload1",	54,			Sound:LoadSound("Sounds/Weapons/ag36/Ag36b_54.wav",0,150)},
		{	"reload2",	13,			Sound:LoadSound("Sounds/Weapons/ag36/ag36g_13.wav",0,150)},
		{	"reload2",	37,			Sound:LoadSound("Sounds/Weapons/ag36/ag36g_37.wav",0,150)},
--		{	"swim",		1,			Sound:LoadSound("Sounds/player/water/underwaterswim2.wav",0,255)},

	},
}

CreateBasicWeapon(AG36);

---------------------------------------------------------------
--ANIMTABLE
------------------
--AUTOMATIC FIRE
AG36.anim_table={}
AG36.anim_table[1]={
	idle={
		"Idle11",
		"Idle21",
	},
	reload={
		"Reload1",
	},
	fidget={
		"fidget11",
	},
	fire={
		"Fire11",
		"Fire21",
	},
	melee={
		"Fire13",
		"Fire23",
	},
	swim={
		"swim"
	},
	activate={
		"Activate1"
	},
}
------------------
--GRENADE LAUNCHER
AG36.anim_table[2]={
	idle={
		"Idle11",
		"Idle21",
	},
	reload={
		"Reload2",
	},
	fidget={
		"fidget11",
	},
	fire={
		"Fire12",
	},
	melee={
		"Fire13",
		"Fire23",
	},
	swim={
		"swim"
	},
	activate={
		"Activate2"
	},
}