<?xml version="1.0" encoding="ISO-8859-1"?>
<units>

	<xdefine name="crye( name_ext )">

		<unit type="weapon" name="crye68$name_ext" slot="12">
			<model file="/weapons/crye/crye$name_ext.xml"/>
			<depends_on unit="crye68_mag$name_ext"/>
			<depends_on unit="crye_combat_sight$name_ext"/>
			<depends_on unit="crye_grenade_launcher$name_ext"/>
			<script_class name="base" class="BulletWeapon"/>
			<stats block="base_data"/>
			<stats block="weapon_data">
				<var name="ammo_type" value="crye"/>
				<var name="length_from_root" value="45"/>
				<var name="clip_max" value="45"/>
				<var name="owner_align" value="primary_align"/>
				<var name="public_name" value="Crye"/>
				<var name="anim_name" value="crye"/>
				<var name="hud_name" value="crye"/>
				<var name="network_id" value="1"/>
				
				<!-- Objects / Units -->
				<var name="object_ejector" value="shell"/> <!-- name of the ejector object -->
				<var name="object_muzzle" value="fire"/> <!-- name of the ejector object -->
				<var name="object_clip_align" value="mag_align"/> <!-- name of the ejector object -->
				<var name="unit_clip" value="crye_mag$name_ext"/> <!-- name of the casing unit -->
				<var name="body_drop" value="main_body"/> <!-- name of the body to activate when dropping the gun -->
				
				<!-- Spread -->
				<var name="spread_normal" value="1.87"/> <!-- spread in normal mode + mods affect this -->
				<var name="spread_zoom" value="0.35"/> <!-- spread in zoomed mode + mods affect this -->
				
				<!-- Recoil -->
				<var name="recoil_normal" value="0.9"/> <!-- spread in zoomed mode + mods affect this -->
				<var name="recoil_zoom" value="0.9"/> <!-- spread in zoomed mode + mods affect this -->
				
				<!-- Fire modes -->
				<var name="fire_modes" value="3"/> <!-- 1 = semi, 2 = semi+auto, 3 = semi+auto+burst -->
				<var name="fire_rate_semi" value="0.120"/> <!-- minimum time between bullets in semi mode -->
				<var name="fire_rate_auto" value="0.068"/> <!-- time between bullets on full auto -->
				<var name="fire_rate_burst" value="0.068"/> <!-- time between bullets in burts mode -->
				<var name="fire_burst_count" value="3"/> <!-- the amount of bullets to fire in a row in burst mode -->
				<var name="admits_reload_firing" value="true"/> <!-- Can be fired during a Tactical reload -->
				
				<var name="fire_offensive" value="2"/> <!-- what thread in SGunLogics this weapon uses when when in offensive -->
				<var name="fire_defensive" value="1"/> <!-- what thread in SGunLogics this weapon uses when when in defensive -->
				<var name="fire_suppresive" value="3"/> <!-- what thread in SGunLogics this weapon uses when when in suppressed -->
				
				<!-- Effects -->
				<var name="effect_semi_flash" value="crye_muzzle_flash"/> <!-- muzzle effect on semi -->
				<var name="effect_auto_flash" value="crye_muzzle_flash"/> <!-- muzzle effect on auto -->
				<var name="effect_auto_end" value="crye_muzzle_smoke"/> <!-- smoke effect on barrel after auto -->
				<var name="effect_casing" value=""/> <!-- name of the casing effect -->
				<var name="effect_hit" value="bullet_hit"/> <!-- name of the hit effect -->
				<var name="effect_hit_physics" value="bullet_hit_rifle"/> <!-- name of the hit physics effect -->
				
				<var name="bolt_lockup_time" value="0.0"/> <!-- bolt anim -->
				<var name="bolt_lock_time" value="0.0"/> <!-- bolt lock anim -->
				<var name="bolt_fire_start_time" value="0.0"/>
				<var name="bolt_fire_end_time" value="0.0"/>
				<var name="bolt_reload_start_time" value="0.133"/>
				<var name="bolt_reload_end_time" value="0.233"/>
				
				<!-- AI -->
				<var name="ai_shoot_delay" value="0.1"/> 				<!-- normal aim time for ai -->		
				<var name="ai_reload_delay" value="4"/> 				<!-- relaod time -->
				<var name="ai_angle_req_near" value="30"/>
				<var name="ai_angle_req_far" value="5"/>	
				
				<!-- Moddable stats -->
				<var name="damage" value="2"/> <!-- weapon damage + mods affect this -->
				<var name="weight" value="2"/> <!-- weapon weight + mods affect this -->
				<var name="stability" value="1"/> <!-- weapon stability + mods affect this -->
				
				<var name="fire_sound" value="1.35"/>
				<var name="fire_supressed" value="1.25"/>
				
				<var name="ai_precision" value="1"/>
				<var name="ai_fire_until" value="2"/>
				<var name="ai_fire_until_rand" value="4"/>
				
				<!-- Mods -->
				<var name="top_mount" value=""/>
				<var name="top_mod" value="crye_ironsights"/>
				<var name="front_mod" value=""/>
				<var name="bottom_mod" value=""/>
				<var name="grenade_mod" value=""/>
				
				<var name="anim_semi_to_burst_start_time" value="0.0"/>
				<var name="anim_semi_to_burst_end_time" value="0.2"/>
				<var name="anim_burst_to_auto_start_time" value="0.2"/>
				<var name="anim_burst_to_auto_end_time" value="0.4"/>
				<var name="anim_auto_to_semi_start_time" value="0.4"/>
				<var name="anim_auto_to_semi_end_time" value="0.56"/>
			</stats>
			<stats block="item_data">
				<var name="inventory_slot" value="primary"/>
			</stats>
			<sounds>
	 			<soundbank name="scar762_sound$name_ext"/>
	 			<soundbank name="foley_rifle_sound"/>
				<default_soundsource source="sound"/>
			</sounds>
		</unit>
	
		<unit type="weapon" name="crye68_mag$name_ext" slot="12">
		    <model file="/weapons/crye/crye_mag$name_ext.xml"/>
			<sounds>
	 			<soundbank name="foley_rifle_sound"/>
				<default_soundsource source="sound"/>
			</sounds>
		</unit>

	</xdefine>
	
	@crye()
	@crye( _3rd )

</units>