//----------------------------------------------------------------
// goobgun.def
//----------------------------------------------------------------

export goobgun
{
	options -game /q4xbase -prefix SRL_ -scale .4 -keep offset lighter light_pivot reticle canister muzzle_flash peice1 peice2 peice3 plunger tube tube1 tube2 tube3 -skipmesh rt_strogg_arm_mesh -skipmesh lft_strogg_arm_mesh -sourcedir models/weapons/flame_goop/animations -destdir models/weapons/goob_gun

	addoptions -skipmesh rt_strogg_arm_mesh 
	addoptions -skipmesh lft_strogg_arm_mesh 

	mesh	idle_00.ma 			-dest mesh
	anim	idle_00.ma 			-dest idle
	anim	fire_00.ma 			-dest fire			-range 4 10
	anim	raise_00.ma			-dest raise
	anim	lower_00.ma			-dest lower
	anim	fire_00.ma			-dest reload		-range 11 24
	anim	reload_slow.ma		-dest reload_empty	
	anim	reload_slow.ma		-dest idle_empty	-range 1 2
}

/* viewmodel will fix
export goobgun_strogg
{
	options -prefix SRL_ -scale .4 -keep muzzle_flash l_vent r_vent -sourcedir work/models/weapons/strogg_rocket_launcher/animations -destdir models/weapons/rocketlauncher
	addoptions -skipmesh rt_arm_mesh 
	addoptions -skipmesh lft_arm_mesh 
	mesh	idle_00.ma 			-dest mesh_strogg
}

export goobgun
{
	options -prefix PLAYER_RKT_ -scale .4 -keep muzzle_flash ATTACHER -sourcedir work/models/characters/marine/animation_mocap_cinematics -destdir models/weapons/rocketlauncher/world -rename ATTACHER origin -clearorigin
	mesh	newMarine_oneframe_idle.ma			-dest rocketlauncher
	anim	newMarine_oneframe_idle.ma			-dest idle
}
*/

entityDef viewStyle_q3_goobgun {
	"viewoffset"				"-2.6 2.2 2.3"
	"viewangles"				"5.7 -3.9 -1.2"
}

//--------------------------------------------------------------------------------------------------------------------
// Weapon Definition
//--------------------------------------------------------------------------------------------------------------------
entityDef weapon_goobgun
{
	"editor_menu"				"pickup"
	"editor_color"				".3 .3 1"
	"editor_mins"				"-16 -16 0"
	"editor_maxs"				"16 16 32"

	"editor_usage"				"Napalm Launcher"

	"spawnclass"				"idItem"
	"weaponclass"				"WeaponGoobGun"
	"size"						"32 32 32"
  	"model_view"				"weapon_goobgun_view"
  	"model_world"				"weapon_goobgun_world"
	"model"						"models/weapons/goob_gun/w_flamegun.ase"
	"def_dropItem"				"weapon_goobgun"
	"mtr_crosshair"				"gfx/guis/crosshairs/crosshair_rocketlauncher"

	"joint_attach"				"RKT_ATTACHER"
	"joint_view_flash"			"muzzle_flash"
	"joint_view_barrel"			"muzzle_flash"
	"joint_world_flash"			"muzzle_flash"

	"def_mod1"					"wpmod_goobgun_flamethrower"

	"inv_weapon"				"weapon_goobgun"
	"inv_start_ammo_goobgun"	"10"
	"inv_item"					"1"
	//"inv_icon"				"gfx/guis/hud/icons/item_fire.tga"
	"inv_icon"					"gfx/guis/hud/icons/item_fire.tga"
	"inv_name"					"Napalm Launcher"	

	"fireRate"					".8"
//	"reloadRate"				".1"
	"spread"					"0"
	"dirOffset"					"0 0 .1"

	"weaponname"				"Napalm Launcher"
	"def_projectile"			"projectile_goob"
	"def_altprojectile"			"projectile_flame"
	"ammoType"					"ammo_goobgun"
	"clipSize"					"20"
	"ammoRequired"				"1"
	"gui"						"guis/weapons/firegun.gui"
	"mtr_icon"					"gfx/guis/hud/icons/gun_flamegun"

	"muzzle_kick_time"			"0.5"
	"muzzle_kick_maxtime"		"0.5"
	"muzzle_kick_angles"		"-15 0 0"
	"muzzle_kick_offset"		"3 0 3"

	"recoilTime"				"50"
	"recoilAngles"				"-.20 0 0"
	
	"mtr_flashShader"			"lights/muzzleflash"
	"flashColor"				"0.99 0.84 .31"
	"flashRadius"				"200"
	"flashPointLight"			"1"
	"flashTime"					".1"
	"flashViewOffset"			"15 -5 -5"

	"mtr_guiLightShader"		"lights/viewWeaponGuiLight"

 	"fx_muzzleflash"			"effects/weapons/rocketlauncher/muzzleflash.fx"
 	"fx_altmuzzleflash"			"effects/weapons/goobgun/alt_corefire.fx"
 	"fx_muzzleflash_world"		"effects/weapons/rocketlauncher/muzzleflash_world.fx"
 	"fx_altmuzzleflash_world"	"effects/weapons/goobgun/alt_corefire.fx"
 	
	"fx_respawn"				"effects/mp/itemrespawn.fx"

	"snd_acquire"				"pickup_weapon"

	"foreshorten"				".6"
	
	"def_viewStyle"				"viewStyle_q3_goobgun"
	
	"weaponAngleOffsetAverages" "10"
	"weaponAngleOffsetScale" 	".15"
	"weaponAngleOffsetMax"		"3"
	"weaponOffsetTime"			"600"
	"weaponOffsetScale"			"0.002"
	
	"useAltFireAnim"			"1"
	
//	"launchFromBarrel"			"1"
 
	"dbTitle"					"Napalm Launcher"
	"dbText"					"Sticky Like Napalm."
	"dbFilter"					"weapon"
	
	
	"cylinderMoveTime"			"850"
	"cylinder_offset0"			"-2.235"
	"cylinder_offset1"			"-2.487"
	"cylinder_offset2"			"-1.806"
	"cylinder_offset3"			"-0.798"
	
	"cylinder_joint0"			"plunger"
	"cylinder_joint1"			"peice1"
	"cylinder_joint2"			"peice2"
	"cylinder_joint3"			"peice3"
}

entityDef weapon_goobgun_mp
{
	"inherit"			"weapon_goobgun"
	"clipSize"			"0"
	"inv_icon"			"gfx/guis/hud/icons/item_flamegun_colored"
}

entityDef moveable_item_goobgun
{
	"inherit"					"weapon_goobgun"

	"editor_rotatable"			"1"

	"spawnclass"				"idMoveableItem"
	"density"					"0.05"
	"friction"					"0.2"
	"bouncyness"				"0"
}

//--------------------------------------------------------------------------------------------------------------------
// Models
//--------------------------------------------------------------------------------------------------------------------

model weapon_goobgun_view
{
	mesh						models/weapons/goob_gun/mesh.md5mesh

	channel legs				( *origin -*tube)
	channel torso				( *tube)

	anim altfire 				models/weapons/goob_gun/idle.md5anim
	anim altidle 				models/weapons/goob_gun/idle.md5anim

	anim idle 					models/weapons/goob_gun/idle.md5anim	
	anim fire 					models/weapons/goob_gun/fire.md5anim	
	{
		rate .25
		
		frame 1					sound_weapon	weapon_goobgun_fire_mono
		frame 1					sound_voice		weapon_goobgun_fire
		//frame 1					fx				effects/weapons/rocketlauncher/vent.fx		muzzle_flash
		//frame 1					fx				effects/weapons/rocketlauncher/vent.fx		muzzle_flash
	}
	
	
	anim idle_empty 			models/weapons/goob_gun/idle_empty.md5anim	
	
	anim reload 				models/weapons/goob_gun/reload.md5anim	
	{
		rate 2
		frame 1						object_call		MoveCylinder
		frame 4						sound_body		weapon_goobgun_reload
		//frame 9					sound_body2		player_rocketlauncher_servo
	}
	
	anim reload_empty			models/weapons/goob_gun/reload_empty.md5anim
	{
		frame 96					sound_body		weapon_goobgun_reload
		frame 24					sound			weapon_shotgun_clipout
		frame 73					sound			weapon_shotgun_clipin
		//frame 8					sound_body2		player_rocketlauncher_servo
	}
		
	anim raise					models/weapons/goob_gun/raise.md5anim
	anim putaway				models/weapons/goob_gun/lower.md5anim
	{
		frame 1					sound	weapon_switch
	}
}

model weapon_goobgun_view_strogg
{
	inherit					weapon_rocketlauncher_view
	
	mesh					models/weapons/goob_gun/mesh_strogg.md5mesh

	channel legs			( *origin -*reload_rack -*ram -iris_bone_6 -iris_bone_5 -iris_bone_4 -iris_bone_3 -iris_bone_2 -iris_bone_1 )
	channel torso			( *reload_rack *ram iris_bone_6 iris_bone_5 iris_bone_4 iris_bone_3 iris_bone_2 iris_bone_1 )
}

model weapon_goobgun_world
{
	mesh					models/weapons/rocketlauncher/world/rocketlauncher.md5mesh
	anim idle				models/weapons/rocketlauncher/world/idle.md5anim
}


//--------------------------------------------------------------------------------------------------------------------
// Projectile
//--------------------------------------------------------------------------------------------------------------------

entityDef projectile_goob
{
	"spawnclass"				"idProjectile"
	"size"						"7 7 7"
	"cone"						"2"
	"noshadows"					"1"
	"clipmask_largeshot"		"1"
	"no_contents"				"0"

	"model"						"models/weapons/goob_gun/flame_gun_glob.ase"
	"def_damage"				"damage_goobDirect"
	"def_splash_damage"			"damage_goobSplash"	

	"speed"						"1200"
	"angular_velocity"			"-10 5 1"
	"settle_duration"			"0.08"
	
	"linear_friction"			"0"
	"angular_friction"			"0"
	"contact_friction"			"10"
	//"bounce"					".65"
	"gravity"					"1.2"
	"fuse"						"2.5"
								
	"detonate_on_fuse"			"1"
	"detonate_on_death"			"0"
	"detonate_on_world"			"1"
	"detonate_on_actor"			"1"
								
	"impact_gib"				"1"
	"decal_size"				"75"

	"flyEffectAttenuateSpeed"	"200"
	
	"airBurst_desc"				"midair_"

	"fx_fly"					"effects/weapons/goobgun/flyburn.fx"
	"fx_impact_water"			"effects/ambient/splash_med.fx"

	"snd_ricochet"				"weapon_goobgun_bounce"
	
	// These are the impact effects and the detonation effects.
	//"fx_detonate"				"effects/weapons/goobgun/detonate.fx"
	//"fx_impact"				"effects/weapons/goobgun/areaburn"
	//"fx_impact_actor"			"effects/weapons/goobgun/actorimpact"
	
	"fx_impact_actor"			"effects/weapons/rocketlauncher/detonate.fx"
	"fx_detonate"				"effects/weapons/goobgun/detonate.fx"
	"fx_impact"					"effects/weapons/goobgun/impact.fx"

	"delay_residual"				"1.5"
	"residual_time"					"6"
	"def_residual_damage"			"damage_lightTank_residualPlasma"	


	//spawn impact entity information
	"impactEntity"				"impact_goob_projectile"
	"numImpactEntities"			"6"
	"ieMinPitch"				"20"
	"ieMaxPitch"				"80"
	"ieSlicePercentage"			"1.00"
	
	"net_syncPhysics"			"1"
}

entityDef projectile_goob_burst
{
	"inherit"					"projectile_goob"
	"numImpactEntities"			"8"
	"speed"						"1600"
}

entityDef impact_goob_projectile
{
	"inherit"	"projectile_grenade"
	"mins"							"-16 -16 -16"
	"maxs"							"16 16 16"
	"no_contents"	"0"

	"fuse"							"0.05"
	"fuse_random"					"0.3"
	"velocity"						"15"
	"speed"							"250"
	"gravity"						"0.5"
	
	"detonate_on_fuse"				"1"
	"detonate_on_death"				"0"
	"detonate_on_world"				"1"
	"detonate_on_actor"				"1"

		
	"fx_impact"						"effects/weapons/goobgun/globburn"
	"fx_impact_actor"				"effects/monsters/light_tank/plasma_impact_actor"
	"fx_detonate"					"effects/weapons/goobgun/detonate.fx"
	"fx_fly"						""

	"delay_residual"				"3"
	"residual_time"					"6"
	"def_residual_damage"			"damage_lightTank_residualPlasma"	
	
	
	"def_damage"					"damage_goobDirect"
	"def_splash_damage"				"damage_goobSplash"
	"model"							"models/weapons/goob_gun/flame_gun_globsmall.ase"
	
	"net_syncPhysics"				"1"
}

//--------------------------------------------------------------------------------------------------------------------
// Damage
//--------------------------------------------------------------------------------------------------------------------

entityDef damage_goobDirect 
{
	"spawnclass"				"FireDOTEntity"
	"damage"					"35"
	"push"						"0"
	"gib"						"1"

	"deathPush"					"200"
	"deathPushMin"				"3000 2000"
	"deathPushMax"				"5000 3000"
	"pain"						"fire"
	
	"damagePerSecond"			"10"
	"lifetime"					"5000"
	"numfirespreads"			"20"
	"firespreadtime"			"120"
	"fx_dmgeffect"				"effects/weapons/goobgun/burn"
	"filter_goob"			"1"
}

entityDef damage_goobSplash
{
	"spawnclass"				"FireDOTEntity"
	"damage"					"25"
	"radius"					"120"
	"knockback"					"100"
	"push"						"10000"
	"gib"						"0"
	"pain"						"fire"

	"deathPush"					"100"
	"deathPushMin"				"5000 6000"
	"deathPushMax"				"7000 8000"
	
	"damagePerSecond"			"10"
	"lifetime"					"5000"
	"numfirespreads"			"20"
	"firespreadtime"			"120"
	"fx_dmgeffect"				"effects/weapons/goobgun/burn"
	"filter_goob"			"1"
}



   entityDef projectile_flame
   {
   	"inherit"					"projectile_blaster"
   
   	"size"						"3 3 3"
   	"cone"						"2"
   	"clipmask_largeshot"		"0"
   	"def_damage"				"damage_goobDirect"
   	
   	"speed"						"1800"
   	"orient_towards_motion"		"1"
   
 	"gravity"					"0"
 	"fuse"						"0.40"			
 	"detonate_on_fuse"			"1"
 	"detonate_on_death"			"0"
 	"detonate_on_world"			"1"
 	"detonate_on_actor"			"1"
 	"detonate_on_bounce"		"1"
 
   	"fx_impact"					""
   	"fx_fly"					""
   	"fx_impact_concrete"		"effects/weapons/hyperblaster/impact_concrete.fx"
   	"fx_impact_rock"			"effects/weapons/hyperblaster/impact_concrete.fx"
   	"fx_impact_glass"			"effects/weapons/hyperblaster/impact_glass.fx"					
   	"fx_impact_bpglass"			"effects/weapons/hyperblaster/impact_bpglass.fx"
   	"fx_impact_electronics"		"effects/weapons/hyperblaster/impact_electronics.fx"	
   	"fx_impact_flesh"			"effects/weapons/hyperblaster/impact_flesh.fx"
   	"fx_impact_monstermetal"	"effects/weapons/hyperblaster/impact_flesh.fx"	
   	"fx_trail"					""
   	"fx_impact_mp"				"effects/weapons/hyperblaster/impact_default_mp.fx"
   	"fx_impact_concrete_mp"		"effects/weapons/hyperblaster/impact_default_mp.fx"
   	"fx_impact_rock_mp"			"effects/weapons/hyperblaster/impact_default_mp.fx"
   	"fx_impact_glass_mp"		"effects/weapons/hyperblaster/impact_default_mp.fx"
   	"fx_impact_bpglass_mp"		"effects/weapons/hyperblaster/impact_default_mp.fx"
   	"fx_impact_electronics_mp"	"effects/weapons/hyperblaster/impact_default_mp.fx"
   }


//entityDef damage_goobSplash_mp
//{
//	"inherit"					"damage_goobSplash"
//	"knockback"					"100"
//	"attackerDamageScale"		"0.25"
//	"attackerPushScale"			"4.0"
//}

entityDef wpmod_goobgun_flamethrower
{
	"weapon"				"weapon_goobgun"
	"zoomFov"					"90"
	"zoomTime"					".1"
	"zoomHideCrosshair"			"0"
	"altFireRate"				".2"		
}

entityDef weaponmod_goobgun_flamethrower
{
	"editor_color"				".3 .3 1"
	"editor_mins"				"-16 -16 0"
	"editor_maxs"				"16 16 32"
	"editor_menu"				"pickup"
	"editor_usage"				"Flamethrower Modification"

	"spawnclass"				"idItem"
	"size"						"32 32 32"
	"inv_weaponmod"				"wpmod_goobgun_flamethrower"
	"inv_item"					"1"
	"model"						"models/items/ammo/ammo_box.lwo"
	"inv_icon"					"gfx/guis/hud/icons/item_fire.tga"
}