
// ========================================================================
// Export
//
export hauser {
	options -prefix BEPB_ -sourcedir models/weapons/strogg_bepb_grenade/dev_sd -destdir  models/weapons/grenades

		mesh	bepb_grenade_base_file.mb			-dest models/weapons/grenades/bepb_grenade_view.md5mesh
		anim	bepb_grenade_idle.mb				-dest models/weapons/grenades/bepb_grenade_idle.md5anim
	 	anim	bepb_grenade_raise.mb				-dest models/weapons/grenades/bepb_grenade_raise.md5anim
	 	anim	bepb_grenade_lower.mb				-dest models/weapons/grenades/bepb_grenade_lower.md5anim

	 	anim	bepb_grenade_quickthrow.mb			-dest models/weapons/grenades/bepb_grenade_quickthrow.md5anim
	 	anim	bepb_grenade_alt_quickthrow.mb		-dest models/weapons/grenades/bepb_grenade_alt_quickthrow.md5anim

 		anim	bepb_grenade_start_throw.mb			-dest models/weapons/grenades/bepb_grenade_throw_start.md5anim
 		anim	bepb_grenade_alt_start_throw.mb		-dest models/weapons/grenades/bepb_grenade_alt_throw_start.md5anim

 		anim	bepb_grenade_throw.mb				-dest models/weapons/grenades/bepb_grenade_throw.md5anim
 		anim	bepb_grenade_alt_throw.mb			-dest models/weapons/grenades/bepb_grenade_alt_throw.md5anim





 	}

// ========================================================================
// view Models
//

model viewmodel_grenade_bepb {
	mesh	 		  		models/weapons/grenades/bepb_grenade_view.md5mesh
	anim	idle	  			models/weapons/grenades/bepb_grenade_idle.md5anim
 	anim	raise	  			models/weapons/grenades/bepb_grenade_raise.md5anim {
 		frame	1				sound_channel snd_weapon_foley snd_gren_up1
 		frame	8				sound_channel snd_weapon_reload snd_gren_up
	}
 	anim	putaway	  			models/weapons/grenades/bepb_grenade_lower.md5anim
 	anim	fire	  			models/weapons/grenades/bepb_grenade_fire.md5anim
 	anim    throw_start 			models/weapons/grenades/bepb_grenade_throw_start.md5anim {
		frame	8				sound_channel snd_weapon_reload snd_gren_prime
	}
 	anim    throw 				models/weapons/grenades/bepb_grenade_throw.md5anim {
		frame	3				sound_channel snd_weapon_mech snd_throw
	}
 	anim    throw_quick 			models/weapons/grenades/bepb_grenade_quickthrow.md5anim {
 		frame	1				sound_channel snd_weapon_reload snd_gren_prime
 		frame	11				sound_channel snd_weapon_mech snd_throw
 	}

 	 	anim    alt_throw_start 		models/weapons/grenades/bepb_grenade_alt_throw_start.md5anim {
		 	frame	1					sound_channel snd_weapon_reload snd_gren_up
		}
		anim    alt_throw 				models/weapons/grenades/bepb_grenade_alt_throw.md5anim {
		 	frame	3					sound_channel snd_weapon_mech snd_throw
		}
		anim    alt_throw_quick 		models/weapons/grenades/bepb_grenade_alt_quickthrow.md5anim {
		 	//frame	1					sound_channel snd_weapon_reload snd_gren_up
		 	frame	11					sound_channel snd_weapon_mech snd_throw
	}

}


invItemDef inventory/weapons/grenades/scrambler {
	type						"grenade"
	slot						"grenade"
	name						"game/weapons/grenade_scrambler"

	data {
		"model_view"				"viewmodel_grenade_bepb"
		"model_world" 				"models/weapons/grenades/gas_grenade_thirdperson.lwo"

		"joint_attach"				"LeftHand"
		"view_offset"				"-6 2 -2"

		"anim_prefix"				"hands_grenades"
		"anim_prefix_class"			"hands"

		"speed_mod"					"1.1"

		"tt_intro_1"				"scrambler_grenade_intro_1"
		"tt_intro_2"				"scrambler_grenade_intro_2"

		"stat_name"					"grenade_scrambler"

		"weapon_scriptobject"		"weapon_grenade"

		"allow_alt_fire"			"1"

		"def_explode_inhand"		"projectile_grenade_scrambler"

		"snd_reload"				"sounds/weapons/grenades/reload"
		"snd_grenade_timer"			"sounds/weapons/grenades/stroggtimer"
		"snd_gren_up1"				"sounds/weapons/grenades/strogg_electro_raise"
		"snd_gren_up"				"sounds/weapons/grenades/strogg_up"
		"snd_gren_prime"			"sounds/weapons/grenades/strogg_prime"
		"snd_throw"					"sounds/weapons/grenades/throw"
		"snd_fireinthehole"			"sounds/players/strogg/botchat/generic/grenade"


		"num_projectiles"			"1"
		"hide_clip"					"1"
		"show_all_ammo"				"1"
		"mtr_weaponmenu"			"guis/assets/icons/weapons/scrambler"
		"crosshair"					"none"
		"clip_based"				"0"

		"crosshair_spread_min"		"0.1"
		"crosshair_spread_max"		"0.1"
		"crosshair_spread_scale"	"1"

		"spread_min"				"0"
		"spread_max"				"0"

		"spread_crouch_min"			"0"
		"spread_crouch_max"			"0"

		"spread_prone_min"			"0"
		"spread_prone_max"			"0"

		"spread_jump_min"			"0"
		"spread_jump_max"			"0"

		"fire_rate"					"1"

		"player_weapon_num"			"4"

		"fx_idle"					"effects/weapons/grenades/scrambler/idle_loop"
		"fx_fire"					"effects/weapons/grenades/scrambler/fire"
		"idle_effect_joint"			"joint2"
	}

	clip {
		"projectile"			"projectile_grenade_scrambler"
		"type"					"grenade"
		"ammo_per_shot"			"1"
		"max_ammo"				"5"
	}

	clip { // uses clip 0 for info
		"projectile"			"projectile_grenade_scrambler_sticky"
		"type"					"grenade"
		"ammo_per_shot"			"1"
		"max_ammo"				"0"
	}
}

entityDef projectile_grenade_scrambler {
	"inherit"					"projectile_grenade"
	"scriptObject"				"projectile_emp"

	"mins"						"-2.3 -2.3 -8.2"
	"maxs"						"2.3 2.3 4.5"
	
	"dmg_splash_damage"			"damage_grenade_scrambler_splash"

	"model" 					"models/weapons/grenades/gas_grenade_world.lwo"

	"emp_radius"				"384"
	"emp_time"					"30"
	"emp_weapon_time"			"5"
	
	"buoyancy"					"0.1"

	"fx_trail"					"effects/weapons/grenades/scrambler/trail"
	"fx_explode"				"effects/weapons/grenades/scrambler/explosion"
	
	"has_postthink"				"1"
}

entityDef projectile_grenade_scrambler_sticky {
	"inherit"					"projectile_grenade_scrambler"
	"velocity"					"250 0 0"
	"stick_on_contact"			"1"
}

damageDef damage_grenade_scrambler_splash {
	damage						"damage_grenade_scrambler_splash"
	radius						320
	knockback					100

	push						100000

	noheadshot

	stat_name					"grenade_scrambler"

	prof_damage					"pro_infiltrator_damage_half"

	team_kill_cvar				"g_allowComplaint_explosives"

	tt_obituary					"tooltips/killmsgs/weapons/grenades/scrambler"
	tt_obituary_team_kill		"tooltips/killmsgs/weapons/grenades/scrambler/teamkill"
	tt_obituary_self			"tooltips/killmsgs/weapons/grenades/scrambler/self"
	tt_obituary_unknown			"tooltips/killmsgs/weapons/grenades/scrambler/unknown"
}

damageFilter damage_grenade_scrambler_splash {
	type {
		target	"target_emp_kill"
		damage	100%
		noScale
	}

	type {
		target	"target_player_all"
		damage	125
	}

	type {
		target	"target_veh_all"
		damage 	200
	}

	type {
		target	"target_deployables_all"
		damage	200
	}

	type {
		target	"target_explodable_emp"
		damage	100
	}
}

toolTip scrambler_grenade_intro_1 {
	sound "sounds/ui/main/neutral"
	text "game/tt/intro/scrambler_grenade_1"
}

toolTip scrambler_grenade_intro_2 {
	sound "sounds/ui/main/neutral"
	text "game/tt/intro/scrambler_grenade_2"
}
