Пример #1
0
static void select_cannon_event (event *ev)
{
	if (get_local_entity_weapon_available (get_gunship_entity (), ENTITY_SUB_TYPE_WEAPON_2A42_30MM_HE_ROUND))
	{
		set_gunship_weapon (ENTITY_SUB_TYPE_WEAPON_2A42_30MM_HE_ROUND);
	}
	else if (get_local_entity_weapon_available (get_gunship_entity (), ENTITY_SUB_TYPE_WEAPON_2A42_30MM_AP_ROUND))
	{
		set_gunship_weapon (ENTITY_SUB_TYPE_WEAPON_2A42_30MM_AP_ROUND);
	}
}
Пример #2
0
void set_kiowa_weapon_damage_status (void)
{
	entity
		*en;

	entity_sub_types
		weapon_sub_type;

	en = get_gunship_entity ();

	set_client_server_entity_weapon_damage (en, KIOWA_LHS_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, kiowa_damage.lh_pylon);
	set_client_server_entity_weapon_damage (en, KIOWA_RHS_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, kiowa_damage.rh_pylon);
	set_client_server_entity_weapon_damage (en, KIOWA_CHAFF_DISPENSER, ENTITY_SUB_TYPE_WEAPON_CHAFF, kiowa_damage.chaff_dispenser);
	set_client_server_entity_weapon_damage (en, KIOWA_FLARE_DISPENSER, ENTITY_SUB_TYPE_WEAPON_FLARE, kiowa_damage.flare_dispenser);

	//
	// check if selected weapon is still available, if not, select next
	//

	weapon_sub_type = get_local_entity_int_value (en, INT_TYPE_SELECTED_WEAPON);

	if (weapon_sub_type != ENTITY_SUB_TYPE_WEAPON_NO_WEAPON)
	{
		if (!get_local_entity_weapon_available (en, weapon_sub_type))
		{
			weapon_sub_type = get_next_available_weapon_sub_type (en);

			set_gunship_weapon (weapon_sub_type);
		}
	}
}
Пример #3
0
void initialise_common_weapon_systems (void)
{
	fire_continuous_weapon = FALSE;

	fire_single_weapon = 0;

	rocket_salvo_size = 1;

	rocket_salvo_count = 0;

	good_tone = FALSE;

	good_tone_delay = 0.0;

	set_client_server_entity_int_value (get_gunship_entity (), INT_TYPE_LOCK_ON_AFTER_LAUNCH, FALSE);

	set_gunship_weapon (ENTITY_SUB_TYPE_WEAPON_NO_WEAPON);
}
Пример #4
0
void set_ka50_weapon_damage_status (void)
{
	entity
		*en;

	entity_sub_types
		weapon_sub_type;

	en = get_gunship_entity ();

	set_client_server_entity_weapon_damage (en, KA50_CANNON_TURRET, ENTITY_SUB_TYPE_WEAPON_2A42_30MM_HE_ROUND, ka50_damage.gun_jammed);
	set_client_server_entity_weapon_damage (en, KA50_CANNON_TURRET, ENTITY_SUB_TYPE_WEAPON_2A42_30MM_AP_ROUND, ka50_damage.gun_jammed);

	set_client_server_entity_weapon_damage (en, KA50_LHS_OUTER_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, ka50_damage.lh_outer_pylon);
	set_client_server_entity_weapon_damage (en, KA50_LHS_INNER_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, ka50_damage.lh_inner_pylon);

	set_client_server_entity_weapon_damage (en, KA50_RHS_OUTER_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, ka50_damage.rh_outer_pylon);
	set_client_server_entity_weapon_damage (en, KA50_RHS_INNER_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, ka50_damage.rh_inner_pylon);

	set_client_server_entity_weapon_damage (en, KA50_LHS_CHAFF_DISPENSER, ENTITY_SUB_TYPE_WEAPON_CHAFF, ka50_damage.lh_chaff_dispensers);
	set_client_server_entity_weapon_damage (en, KA50_RHS_CHAFF_DISPENSER, ENTITY_SUB_TYPE_WEAPON_CHAFF, ka50_damage.rh_chaff_dispensers);

	set_client_server_entity_weapon_damage (en, KA50_LHS_FLARE_DISPENSER, ENTITY_SUB_TYPE_WEAPON_FLARE, ka50_damage.lh_flare_dispensers);
	set_client_server_entity_weapon_damage (en, KA50_RHS_FLARE_DISPENSER, ENTITY_SUB_TYPE_WEAPON_FLARE, ka50_damage.rh_flare_dispensers);

	//
	// check if selected weapon is still available, if not, select next
	//

	weapon_sub_type = get_local_entity_int_value (en, INT_TYPE_SELECTED_WEAPON);

	if (weapon_sub_type != ENTITY_SUB_TYPE_WEAPON_NO_WEAPON)
	{
		if (!get_local_entity_weapon_available (en, weapon_sub_type))
		{
			weapon_sub_type = get_next_available_weapon_sub_type (en);

			set_gunship_weapon (weapon_sub_type);
		}
	}
}
Пример #5
0
void set_apache_weapon_damage_status (void)
{
	entity
		*en;

	entity_sub_types
		weapon_sub_type;

	en = get_gunship_entity ();

	set_client_server_entity_weapon_damage (en, APACHE_CHAIN_GUN_TURRET, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, apache_damage.gun_jammed);

	set_client_server_entity_weapon_damage (en, APACHE_LHS_WING_TIP_MOUNT, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, apache_damage.lh_wing_tip_mount);
	set_client_server_entity_weapon_damage (en, APACHE_LHS_OUTER_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, apache_damage.lh_outer_pylon);
	set_client_server_entity_weapon_damage (en, APACHE_LHS_INNER_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, apache_damage.lh_inner_pylon);

	set_client_server_entity_weapon_damage (en, APACHE_RHS_WING_TIP_MOUNT, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, apache_damage.rh_wing_tip_mount);
	set_client_server_entity_weapon_damage (en, APACHE_RHS_OUTER_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, apache_damage.rh_outer_pylon);
	set_client_server_entity_weapon_damage (en, APACHE_RHS_INNER_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, apache_damage.rh_inner_pylon);

	set_client_server_entity_weapon_damage (en, APACHE_CHAFF_DISPENSER, ENTITY_SUB_TYPE_WEAPON_CHAFF, apache_damage.chaff_dispenser);
	set_client_server_entity_weapon_damage (en, APACHE_FLARE_DISPENSER, ENTITY_SUB_TYPE_WEAPON_FLARE, apache_damage.flare_dispenser);

	//
	// check if selected weapon is still available, if not, select next
	//

	weapon_sub_type = get_local_entity_int_value (en, INT_TYPE_SELECTED_WEAPON);

	if (weapon_sub_type != ENTITY_SUB_TYPE_WEAPON_NO_WEAPON)
	{
		if (!get_local_entity_weapon_available (en, weapon_sub_type))
		{
			weapon_sub_type = get_next_available_weapon_sub_type (en);

			set_gunship_weapon (weapon_sub_type);
		}
	}
}
Пример #6
0
void set_default_weapon_damage_status (void)
{
	entity
		*en;

	entity_sub_types
		weapon_sub_type;

	en = get_gunship_entity ();


	switch (get_local_entity_int_value (en, INT_TYPE_ENTITY_SUB_TYPE))
	{
		case ENTITY_SUB_TYPE_AIRCRAFT_AH1T_SEACOBRA:
		case ENTITY_SUB_TYPE_AIRCRAFT_AH1W_SUPERCOBRA:
		{

	set_client_server_entity_weapon_damage (en, COBRA_CANNON_TURRET, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.gun_jammed);

	//set_client_server_entity_weapon_damage (en, APACHE_LHS_WING_TIP_MOUNT, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.lh_wing_tip_mount);
	set_client_server_entity_weapon_damage (en, COBRA_LHS_OUTER_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.lh_outer_pylon);
	set_client_server_entity_weapon_damage (en, COBRA_LHS_INNER_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.lh_inner_pylon);

	//set_client_server_entity_weapon_damage (en, APACHE_RHS_WING_TIP_MOUNT, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.rh_wing_tip_mount);
	set_client_server_entity_weapon_damage (en, COBRA_RHS_OUTER_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.rh_outer_pylon);
	set_client_server_entity_weapon_damage (en, COBRA_RHS_INNER_PYLON, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.rh_inner_pylon);

	set_client_server_entity_weapon_damage (en, COBRA_LHS_CHAFF_DISPENSER, ENTITY_SUB_TYPE_WEAPON_CHAFF, default_damage.chaff_dispenser);
	set_client_server_entity_weapon_damage (en, COBRA_LHS_FLARE_DISPENSER, ENTITY_SUB_TYPE_WEAPON_FLARE, default_damage.flare_dispenser);
		}
		case ENTITY_SUB_TYPE_AIRCRAFT_KA29_HELIX_B:
		{

	//set_client_server_entity_weapon_damage (en, COBRA_CANNON_TURRET, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.gun_jammed);

	//set_client_server_entity_weapon_damage (en, APACHE_LHS_WING_TIP_MOUNT, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.lh_wing_tip_mount);
	set_client_server_entity_weapon_damage (en, 2, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.lh_outer_pylon);
	set_client_server_entity_weapon_damage (en, 0, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.lh_inner_pylon);

	//set_client_server_entity_weapon_damage (en, APACHE_RHS_WING_TIP_MOUNT, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.rh_wing_tip_mount);
	set_client_server_entity_weapon_damage (en, 3, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.rh_outer_pylon);
	set_client_server_entity_weapon_damage (en, 1, ENTITY_SUB_TYPE_WEAPON_NO_WEAPON, default_damage.rh_inner_pylon);

	set_client_server_entity_weapon_damage (en, HELIX_CHAFF_DISPENSER, ENTITY_SUB_TYPE_WEAPON_CHAFF, default_damage.chaff_dispenser);
	set_client_server_entity_weapon_damage (en, HELIX_FLARE_DISPENSER, ENTITY_SUB_TYPE_WEAPON_FLARE, default_damage.flare_dispenser);
		}
	}

	//
	// check if selected weapon is still available, if not, select next
	//

	weapon_sub_type = get_local_entity_int_value (en, INT_TYPE_SELECTED_WEAPON);

	if (weapon_sub_type != ENTITY_SUB_TYPE_WEAPON_NO_WEAPON)
	{
		if (!get_local_entity_weapon_available (en, weapon_sub_type))
		{
			weapon_sub_type = get_next_available_weapon_sub_type (en);

			set_gunship_weapon (weapon_sub_type);
		}
	}
}