void update_hokum_target_acquisition_system (void) { if (hokum_damage.helmet_mounted_sight) { if (hud_mode == HUD_MODE_WEAPON) { hud_mode = HUD_MODE_NAVIGATION; } } switch (target_acquisition_system) { //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_OFF: //////////////////////////////////////// { target_locked = FALSE; update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_OFF); slave_common_eo_to_current_target (); slave_hokum_eo_to_current_target (); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_GROUND_RADAR: //////////////////////////////////////// { update_hokum_ground_radar (); update_common_ground_radar (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_GROUND_RADAR); slave_common_eo_to_current_target (); slave_hokum_eo_to_current_target (); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_AIR_RADAR: //////////////////////////////////////// { update_hokum_air_radar (); update_common_air_radar (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_AIR_RADAR); slave_common_eo_to_current_target (); slave_hokum_eo_to_current_target (); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_FLIR: //////////////////////////////////////// { update_hokum_eo (&hokum_flir); update_common_eo (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_FLIR); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_LLLTV: //////////////////////////////////////// { update_hokum_eo (&hokum_llltv); update_common_eo (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_LLLTV); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_PERISCOPE: //////////////////////////////////////// { update_hokum_eo (&hokum_periscope); update_common_eo (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_PERISCOPE); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_HMS: //////////////////////////////////////// { update_hokum_hms (); update_common_hms (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_HMS); slave_common_eo_to_current_target (); slave_hokum_eo_to_current_target (); break; } } //////////////////////////////////////// // // radar / laser / los to target // //////////////////////////////////////// { entity *source, *target; int radar_on, laser_on, los_to_target; source = get_gunship_entity (); target = get_local_entity_parent (source, LIST_TYPE_TARGET); // // radar on/off // radar_on = FALSE; if (target_acquisition_system == TARGET_ACQUISITION_SYSTEM_GROUND_RADAR) { if (ground_radar.sweep_mode != RADAR_SWEEP_MODE_SINGLE_INACTIVE) { radar_on = TRUE; } } else if (target_acquisition_system == TARGET_ACQUISITION_SYSTEM_AIR_RADAR) { if (air_radar.sweep_mode != RADAR_SWEEP_MODE_SINGLE_INACTIVE) { radar_on = TRUE; } } if (radar_on != get_local_entity_int_value (source, INT_TYPE_RADAR_ON)) { set_client_server_entity_int_value (source, INT_TYPE_RADAR_ON, radar_on); } // // laser on/off // laser_on = FALSE; if (target_acquisition_system != TARGET_ACQUISITION_SYSTEM_OFF) { if (!hokum_damage.laser_designator) { laser_on = TRUE; } } if (laser_on != get_local_entity_int_value (source, INT_TYPE_LASER_ON)) { set_client_server_entity_int_value (source, INT_TYPE_LASER_ON, laser_on); } // // line of sight to target // if (target) { switch (target_acquisition_system) { case TARGET_ACQUISITION_SYSTEM_OFF: { los_to_target = FALSE; break; } case TARGET_ACQUISITION_SYSTEM_GROUND_RADAR: case TARGET_ACQUISITION_SYSTEM_AIR_RADAR: { los_to_target = get_local_entity_int_value (target, INT_TYPE_GUNSHIP_RADAR_LOS_CLEAR); break; } case TARGET_ACQUISITION_SYSTEM_FLIR: case TARGET_ACQUISITION_SYSTEM_LLLTV: case TARGET_ACQUISITION_SYSTEM_PERISCOPE: { los_to_target = TRUE; break; } case TARGET_ACQUISITION_SYSTEM_HMS: { los_to_target = TRUE; break; } } } else { los_to_target = FALSE; } if (los_to_target != get_local_entity_int_value (source, INT_TYPE_LOS_TO_TARGET)) { set_client_server_entity_int_value (source, INT_TYPE_LOS_TO_TARGET, los_to_target); } } }
void update_comanche_target_acquisition_system (void) { switch (target_acquisition_system) { //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_OFF: //////////////////////////////////////// { target_locked = FALSE; update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_OFF); slave_common_eo_to_current_target (); slave_comanche_eo_to_current_target (); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_GROUND_RADAR: //////////////////////////////////////// { update_comanche_ground_radar (); update_common_ground_radar (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_GROUND_RADAR); slave_common_eo_to_current_target (); slave_comanche_eo_to_current_target (); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_AIR_RADAR: //////////////////////////////////////// { update_comanche_air_radar (); update_common_air_radar (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_AIR_RADAR); slave_common_eo_to_current_target (); slave_comanche_eo_to_current_target (); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_FLIR: //////////////////////////////////////// { update_comanche_eo (&comanche_flir); update_common_eo (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_FLIR); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_DTV: //////////////////////////////////////// { update_comanche_eo (&comanche_dtv); update_common_eo (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_DTV); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_DVO: //////////////////////////////////////// { update_comanche_eo (&comanche_dvo); update_common_eo (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_DVO); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_HIDSS: //////////////////////////////////////// { update_comanche_hms (); update_common_hms (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_HIDSS); slave_common_eo_to_current_target (); slave_comanche_eo_to_current_target (); break; } } //////////////////////////////////////// // // radar / laser / los to target // //////////////////////////////////////// { entity *source, *target; int radar_on, laser_on, los_to_target; source = get_gunship_entity (); target = get_local_entity_parent (source, LIST_TYPE_TARGET); // // radar on/off // radar_on = FALSE; if (target_acquisition_system == TARGET_ACQUISITION_SYSTEM_GROUND_RADAR) { if (ground_radar.sweep_mode != RADAR_SWEEP_MODE_SINGLE_INACTIVE) { radar_on = TRUE; } } else if (target_acquisition_system == TARGET_ACQUISITION_SYSTEM_AIR_RADAR) { if (air_radar.sweep_mode != RADAR_SWEEP_MODE_SINGLE_INACTIVE) { radar_on = TRUE; } } if (radar_on != get_local_entity_int_value (source, INT_TYPE_RADAR_ON)) { set_client_server_entity_int_value (source, INT_TYPE_RADAR_ON, radar_on); } // // laser on/off // laser_on = FALSE; if (target_acquisition_system != TARGET_ACQUISITION_SYSTEM_OFF) { if (!comanche_damage.laser_designator) { laser_on = TRUE; } } if (laser_on != get_local_entity_int_value (source, INT_TYPE_LASER_ON)) { set_client_server_entity_int_value (source, INT_TYPE_LASER_ON, laser_on); } // // line of sight to target // if (target) { switch (target_acquisition_system) { case TARGET_ACQUISITION_SYSTEM_OFF: { los_to_target = FALSE; break; } case TARGET_ACQUISITION_SYSTEM_GROUND_RADAR: case TARGET_ACQUISITION_SYSTEM_AIR_RADAR: { los_to_target = get_local_entity_int_value (target, INT_TYPE_GUNSHIP_RADAR_LOS_CLEAR); break; } case TARGET_ACQUISITION_SYSTEM_FLIR: case TARGET_ACQUISITION_SYSTEM_DTV: case TARGET_ACQUISITION_SYSTEM_DVO: { los_to_target = TRUE; break; } case TARGET_ACQUISITION_SYSTEM_HIDSS: { los_to_target = TRUE; break; } } } else { los_to_target = FALSE; } if (los_to_target != get_local_entity_int_value (source, INT_TYPE_LOS_TO_TARGET)) { set_client_server_entity_int_value (source, INT_TYPE_LOS_TO_TARGET, los_to_target); } } }
void update_viper_target_acquisition_system (void) { switch (target_acquisition_system) { //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_OFF: //////////////////////////////////////// { target_locked = FALSE; update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_OFF); slave_common_eo_to_current_target (); slave_viper_eo_to_current_target (); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_FLIR: //////////////////////////////////////// { update_viper_eo (&viper_flir); update_common_eo (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_FLIR); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_DTV: //////////////////////////////////////// { update_viper_eo (&viper_dtv); update_common_eo (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_DTV); break; } //////////////////////////////////////// case TARGET_ACQUISITION_SYSTEM_HIDSS: //////////////////////////////////////// { update_apache_hms (); update_common_hms (); update_weapon_lock_type (TARGET_ACQUISITION_SYSTEM_HIDSS); slave_common_eo_to_current_target (); slave_apache_eo_to_current_target (); break; } } //////////////////////////////////////// // // radar / laser / los to target // //////////////////////////////////////// { entity *source, *target; int laser_on, los_to_target; source = get_gunship_entity (); target = get_local_entity_parent (source, LIST_TYPE_TARGET); // // laser on/off // laser_on = laser_is_active() && !viper_damage.laser_designator; if (laser_on != get_local_entity_int_value (source, INT_TYPE_LASER_ON)) { set_client_server_entity_int_value (source, INT_TYPE_LASER_ON, laser_on); } // // line of sight to target // if (target) { switch (target_acquisition_system) { case TARGET_ACQUISITION_SYSTEM_OFF: { los_to_target = FALSE; break; } case TARGET_ACQUISITION_SYSTEM_FLIR: case TARGET_ACQUISITION_SYSTEM_DTV: case TARGET_ACQUISITION_SYSTEM_HIDSS: { los_to_target = TRUE; break; } } } else { los_to_target = FALSE; } if (los_to_target != get_local_entity_int_value (source, INT_TYPE_LOS_TO_TARGET)) { set_client_server_entity_int_value (source, INT_TYPE_LOS_TO_TARGET, los_to_target); } } }