Example #1
0
static void update_master_caution (void)
{
	//
	// monitor engine damage
	//

	engine_damage_imminent_status = get_current_flight_dynamics_engine_damage_imminent ();

	if ((!previous_engine_damage_imminent_status) && engine_damage_imminent_status)
	{
		play_client_server_warning_message (get_gunship_entity (), SPEECH_SYSTEM_ENGINE_OVERTORQUE);

		activate_apache_master_caution ();
	}

	previous_engine_damage_imminent_status = engine_damage_imminent_status;

	//
	// update master caution
	//

	master_caution_sound_timer -= get_delta_time ();

	if (master_caution_sound_timer <= 0.0)
	{
		master_caution_sound_timer = 0.0;

		pause_local_entity_sound_type (get_gunship_entity (), ENTITY_SUB_TYPE_EFFECT_SOUND_MCA, 0.5);
	}
}
Example #2
0
void notify_apache_avionics_of_dynamics_fault (unsigned int damage)
{
	if (damage & DYNAMICS_DAMAGE_MAIN_ROTOR)
	{
		activate_apache_master_caution ();

		set_apache_upfront_display_text ("MAIN ROTOR", "DAMAGED", NULL, NULL);
	}

	if (damage & DYNAMICS_DAMAGE_TAIL_ROTOR)
	{
		activate_apache_master_caution ();

		set_apache_upfront_display_text ("TAIL ROTOR", "DAMAGED", NULL, NULL);
	}

	if (damage & DYNAMICS_DAMAGE_LEFT_ENGINE)
	{
		activate_apache_master_caution ();

		set_apache_upfront_display_text ("ENGINE 1", "DAMAGED", NULL, NULL);
	}

	if (damage & DYNAMICS_DAMAGE_RIGHT_ENGINE)
	{
		activate_apache_master_caution ();

		set_apache_upfront_display_text ("ENGINE 2", "DAMAGED", NULL, NULL);
	}

	if (damage & DYNAMICS_DAMAGE_LEFT_ENGINE_FIRE)
	{
		activate_apache_master_caution ();

		set_apache_upfront_display_text ("ENGINE 1 FIRE", "", NULL, NULL);
	}

	if (damage & DYNAMICS_DAMAGE_RIGHT_ENGINE_FIRE)
	{
		activate_apache_master_caution ();

		set_apache_upfront_display_text ("ENGINE 2 FIRE", "", NULL, NULL);
	}

	if (damage & DYNAMICS_DAMAGE_LOW_HYDRAULICS)
	{
		set_apache_upfront_display_text ("HYDRAULICS", "PRESSURE LOW", NULL, NULL);
	}

	if (damage & DYNAMICS_DAMAGE_STABILISER)
	{
		set_apache_upfront_display_text ("STABILISER", "FAILURE", NULL, NULL);
	}

	if (damage & DYNAMICS_DAMAGE_FUEL_LEAK)
	{
		set_apache_upfront_display_text ("FUEL LEAK", "", NULL, NULL);
	}

	if (damage & DYNAMICS_DAMAGE_LOW_OIL_PRESSURE)
	{
		set_apache_upfront_display_text ("LOW OIL", "PRESSURE", NULL, NULL);
	}

	if (damage & DYNAMICS_DAMAGE_HIGH_OIL_PRESSURE)
	{
		set_apache_upfront_display_text ("HIGH OIL", "PRESSURE", NULL, NULL);
	}
}