void play_building_destroyed_speech (entity *building, entity *aggressor) { int val, array_type, speech_index; entity_sides aggressor_side; ASSERT (aggressor); if (get_local_entity_int_value (aggressor, INT_TYPE_IDENTIFY_AIRCRAFT)) { // PLAY_SPEECH (WINGMAN/CPG) // // (There goes the neighbourhood) | (meeting adjourned) etc. aggressor_side = (entity_sides) get_local_entity_int_value (aggressor, INT_TYPE_SIDE); val = get_speech_random_value ( building_destroyed_cpg_comments, num_building_destroyed_cpg_comments [aggressor_side], last_building_destroyed_cpg_comment [aggressor_side] ); array_type = building_destroyed_cpg_comments [val].array_type; speech_index = building_destroyed_cpg_comments [val].speech_index; if (get_local_entity_int_value (aggressor, INT_TYPE_PLAYER) != ENTITY_PLAYER_AI) { play_client_server_cpg_message (aggressor, 0.4, 4.0, SPEECH_CATEGORY_DESTROYED_TARGETS, 18.0, speech_index); } else { play_client_server_wingman_message ( aggressor, 0.4, 4.0, SPEECH_CATEGORY_DESTROYED_TARGETS, 18.0, SPEECH_INTRODUCTION_SOMETIMES, SPEECH_ARRAY_WINGMAN_MESSAGES, SPEECH_WINGMAN_TARGET_DESTROYED ); } } }
void play_aircraft_destroyed_speech (entity *victim, entity *aggressor) { entity_sides victim_side, aggressor_side; int val, array_type, speech_index; ASSERT (victim); ASSERT (aggressor); victim_side = (entity_sides) get_local_entity_int_value (victim, INT_TYPE_SIDE); aggressor_side = (entity_sides) get_local_entity_int_value (aggressor, INT_TYPE_SIDE); if (aggressor_side == victim_side) { // // FRIENDLY FIRE // if (get_local_entity_int_value (aggressor, INT_TYPE_PLAYER) != ENTITY_PLAYER_AI) { if (aggressor != victim) { // PLAY_SPEECH (CPG) // // (Hold your fire, we're hitting friendlies) | (Cease fire, we're hitting our own guys) if (rand16 () & 1) { speech_index = SPEECH_CPG_FRIENDLY_FIRE1; } else { speech_index = SPEECH_CPG_FRIENDLY_FIRE2; } play_client_server_cpg_message ( aggressor, 1.0, 3.0, SPEECH_CATEGORY_ATTACKING_TARGETS, 8.0, speech_index ); } } } else { if (get_local_entity_int_value (aggressor, INT_TYPE_IDENTIFY_AIRCRAFT)) { if (get_local_entity_int_value (aggressor, INT_TYPE_PLAYER) != ENTITY_PLAYER_AI) { // PLAY_SPEECH (CPG) // // (Target down) | (Enemy aircraft shot down) | etc val = get_speech_random_value ( aircraft_destroyed_cpg_comments, num_ac_destroyed_cpg_comments [aggressor_side], last_ac_destroyed_cpg_comment [aggressor_side] ); array_type = aircraft_destroyed_cpg_comments [val].array_type; speech_index = aircraft_destroyed_cpg_comments [val].speech_index; play_client_server_cpg_message ( aggressor, 0.6, 5.0, SPEECH_CATEGORY_DESTROYED_TARGETS, 8.0, speech_index ); } else { // PLAY_SPEECH (WINGMAN) // play_client_server_wingman_message ( aggressor, 0.6, 5.0, SPEECH_CATEGORY_DESTROYED_TARGETS, 8.0, SPEECH_INTRODUCTION_SOMETIMES, SPEECH_ARRAY_WINGMAN_MESSAGES, SPEECH_WINGMAN_TARGET_DESTROYED ); } } } }
void play_aircraft_shot_at_speech (entity *victim, entity *aggressor) { entity_sides victim_side, aggressor_side; int val, array_type, speech_index, *last_index; ASSERT (victim); ASSERT (aggressor); victim_side = (entity_sides) get_local_entity_int_value (victim, INT_TYPE_SIDE); aggressor_side = (entity_sides) get_local_entity_int_value (aggressor, INT_TYPE_SIDE); last_index = NULL; if (aggressor_side == victim_side) { // // FRIENDLY FIRE // //////////////////////////////////// // // victims speech // //////////////////////////////////// //////////////////////////////////// // // Aggressors speech // //////////////////////////////////// if (get_local_entity_int_value (aggressor, INT_TYPE_PLAYER) != ENTITY_PLAYER_AI) { if (aggressor != victim) { // PLAY_SPEECH (CPG) // // (Hold your fire, we're hitting friendlies) | (Cease fire, we're hitting our own guys) if (rand16 () & 1) { speech_index = SPEECH_CPG_FRIENDLY_FIRE1; } else { speech_index = SPEECH_CPG_FRIENDLY_FIRE2; } play_client_server_cpg_message ( aggressor, 1.0, 3.0, SPEECH_CATEGORY_ATTACKING_TARGETS, 8.0, speech_index ); } } } else { if (aircraft_critically_damaged (victim)) { //////////////////////////////////// // // victims speech // //////////////////////////////////// if (get_local_entity_int_value (victim, INT_TYPE_PLAYER) != ENTITY_PLAYER_AI) { // PLAY_SPEECH (CPG) // // (Where did that come from) | (We're french fries) | etc } else { // PLAY_SPEECH (WINGMAN) // // [This is..] // [callsign + number] // (Mayday, Mayday, we are going down) | (I've been hit, I'm going down, repeat going down) speech_index = SPEECH_WINGMAN_GOING_DOWN; play_client_server_wingman_message ( victim, 0.5, 4.0, SPEECH_CATEGORY_UNDER_ATTACK, 10.0, SPEECH_INTRODUCTION_ALWAYS, SPEECH_ARRAY_WINGMAN_MESSAGES, speech_index ); } //////////////////////////////////// // // Aggressors speech // //////////////////////////////////// play_aircraft_destroyed_speech (victim, aggressor); } else { //////////////////////////////////// // // victims speech // //////////////////////////////////// if (get_local_entity_int_value (victim, INT_TYPE_PLAYER) != ENTITY_PLAYER_AI) { } else { // PLAY_SPEECH (WINGMAN) // // [This is..] // [callsign + number] // (We're taking hits) | (Things are heating up out here) | (It's too dangerous up here etc..) val = get_speech_random_value ( aircraft_hit_victim_wingman_comments, num_ac_hit_victim_wingman_comments [victim_side], last_ac_hit_victim_wingman_comment [victim_side] ); array_type = aircraft_hit_victim_wingman_comments [val].array_type; speech_index = aircraft_hit_victim_wingman_comments [val].speech_index; play_client_server_wingman_message ( victim, 0.8, 8.0, SPEECH_CATEGORY_UNDER_ATTACK, 16.0, aircraft_hit_victim_wingman_comments [val].introduction, (speech_array_types) array_type, speech_index ); } //////////////////////////////////// // // Aggressors speech // //////////////////////////////////// if (get_local_entity_int_value (aggressor, INT_TYPE_IDENTIFY_AIRCRAFT)) { if (get_local_entity_int_value (aggressor, INT_TYPE_PLAYER) != ENTITY_PLAYER_AI) { // PLAY_SPEECH (CPG) // // (Target Hit) | (Turkey shoot) | (Fish in a barrel) | (They can run, etc) val = get_speech_random_value ( aircraft_hit_aggressor_cpg_comments, num_ac_hit_aggressor_cpg_comments [aggressor_side], last_ac_hit_aggressor_cpg_comment [aggressor_side] ); array_type = aircraft_hit_aggressor_cpg_comments [val].array_type; speech_index = aircraft_hit_aggressor_cpg_comments [val].speech_index; play_client_server_cpg_message ( aggressor, 0.6, 5.0, SPEECH_CATEGORY_ATTACKING_TARGETS, 15.0, speech_index ); } else { // PLAY_SPEECH (WINGMAN) // // [This is..] // [callsign + number] // (Target Hit) | (Turkey shoot) | (Fish in a barrel) | (They can run, etc) val = get_speech_random_value ( aircraft_hit_aggressor_wingman_comments, num_ac_hit_aggressor_wingman_comments [aggressor_side], last_ac_hit_aggressor_wingman_comment [aggressor_side] ); array_type = aircraft_hit_aggressor_wingman_comments [val].array_type; speech_index = aircraft_hit_aggressor_wingman_comments [val].speech_index; play_client_server_wingman_message ( aggressor, 0.6, 5.0, SPEECH_CATEGORY_ATTACKING_TARGETS, 16.0, aircraft_hit_aggressor_wingman_comments [val].introduction, (speech_array_types) array_type, speech_index ); } } } } }
void play_vehicle_shot_at_speech (entity *victim, entity *aggressor) { entity_sides victim_side, aggressor_side; int val, speech_index; vec3d *pos; ASSERT (victim); ASSERT (aggressor); pos = get_local_entity_vec3d_ptr (victim, VEC3D_TYPE_POSITION); ASSERT (pos); victim_side = get_local_entity_int_value (victim, INT_TYPE_SIDE); aggressor_side = get_local_entity_int_value (aggressor, INT_TYPE_SIDE); if (aggressor_side == victim_side) { // // FRIENDLY FIRE // //////////////////////////////////// // // victims speech // //////////////////////////////////// //////////////////////////////////// // // Aggressors speech // //////////////////////////////////// if (get_local_entity_int_value (aggressor, INT_TYPE_PLAYER) != ENTITY_PLAYER_AI) { // // PLAY_SPEECH (CPG) // if (rand16 () & 1) { speech_index = SPEECH_CPG_FRIENDLY_FIRE1; } else { speech_index = SPEECH_CPG_FRIENDLY_FIRE2; } play_client_server_cpg_message ( aggressor, 1.0, 3.0, SPEECH_CATEGORY_ATTACKING_TARGETS, 12.0, speech_index ); } } else { //////////////////////////////////// // // victims speech // //////////////////////////////////// val = get_speech_random_value ( vehicle_hit_comments, num_vehicle_hit_comments [victim_side], last_vehicle_hit_comment [victim_side] ); speech_index = vehicle_hit_comments [val].speech_index; get_speech_sector_coordinates (pos); // PLAY_SPEECH (GC) // // [GC Introduction], // (We are pinned down by enemy fire) | (we are taking heavy fire, requesting ariel assistance) // location play_client_server_speech ( get_session_entity (), victim, victim_side, ENTITY_SUB_TYPE_EFFECT_SOUND_RADIO_MESSAGE, SOUND_LOCALITY_RADIO, 0.0, 1.0, 45.0, SPEECH_ORIGINATOR_GROUND_CONTROLLER, SPEECH_CATEGORY_UNDER_ATTACK, 300.0, SPEECH_ARRAY_GC_MESSAGES, SPEECH_GC_INTRODUCTION, SPEECH_ARRAY_GC_MESSAGES, speech_index, SPEECH_ARRAY_NUMBERS, speech_sector_coordinates [0], SPEECH_ARRAY_NUMBERS, speech_sector_coordinates [1], SPEECH_ARRAY_NUMBERS, speech_sector_coordinates [2], SPEECH_ARRAY_NUMBERS, speech_sector_coordinates [3], SPEECH_ARRAY_NUMBERS, speech_sector_coordinates [4], SPEECH_ARRAY_NUMBERS, speech_sector_coordinates [5], -1 ); //////////////////////////////////// // // Aggressors speech // //////////////////////////////////// if (get_local_entity_int_value (aggressor, INT_TYPE_IDENTIFY_AIRCRAFT)) { if (get_local_entity_int_value (aggressor, INT_TYPE_PLAYER) != ENTITY_PLAYER_AI) { // // PLAY_SPEECH (CPG) // play_client_server_cpg_message ( aggressor, 0.4, 3.0, SPEECH_CATEGORY_ATTACKING_TARGETS, 12.0, SPEECH_CPG_TARGET_HIT ); } else { // // PLAY_SPEECH (WINGMAN) // play_client_server_wingman_message ( aggressor, 0.4, 3.0, SPEECH_CATEGORY_ATTACKING_TARGETS, 12.0, SPEECH_INTRODUCTION_SOMETIMES, SPEECH_ARRAY_WINGMAN_MESSAGES, SPEECH_WINGMAN_TARGET_HIT ); } } } }
void play_vehicle_destroyed_speech (entity *victim, entity *aggressor) { entity_sides victim_side, aggressor_side; int val, array_type, speech_index; ASSERT (victim); ASSERT (aggressor); victim_side = get_local_entity_int_value (victim, INT_TYPE_SIDE); aggressor_side = get_local_entity_int_value (aggressor, INT_TYPE_SIDE); if (victim_side == aggressor_side) { // // FRIENDLY FIRE // if (get_local_entity_int_value (aggressor, INT_TYPE_PLAYER) != ENTITY_PLAYER_AI) { // PLAY_SPEECH (CPG) // // (Hold your fire, we're hitting friendlies) | (Cease fire, we're hitting our own guys) if (rand16 () & 1) { speech_index = SPEECH_CPG_FRIENDLY_FIRE1; } else { speech_index = SPEECH_CPG_FRIENDLY_FIRE2; } play_client_server_cpg_message ( aggressor, 1.0, 3.0, SPEECH_CATEGORY_ATTACKING_TARGETS, 8.0, speech_index ); } } else { if (get_local_entity_int_value (aggressor, INT_TYPE_IDENTIFY_AIRCRAFT)) { if (get_local_entity_int_value (aggressor, INT_TYPE_PLAYER) != ENTITY_PLAYER_AI) { // PLAY_SPEECH (CPG) // // (Target destroyed) | (Enemy armour destroyed) | (Good Kill) | etc val = get_speech_random_value ( vehicle_destroyed_cpg_comments, num_vh_destroyed_cpg_comments [aggressor_side], last_vh_destroyed_cpg_comment [aggressor_side] ); speech_index = vehicle_destroyed_cpg_comments [val].speech_index; play_client_server_cpg_message ( aggressor, 0.4, 3.0, SPEECH_CATEGORY_ATTACKING_TARGETS, 10.0, speech_index ); } else { // PLAY_SPEECH (WINGMAN) // // (Target destroyed) | (Enemy armour destroyed) | (Good Kill) | etc val = get_speech_random_value ( vehicle_destroyed_wingman_comments, num_vh_destroyed_wingman_comments [aggressor_side], last_vh_destroyed_wingman_comment [aggressor_side] ); array_type = vehicle_destroyed_wingman_comments [val].array_type; speech_index = vehicle_destroyed_wingman_comments [val].speech_index; play_client_server_wingman_message ( aggressor, 0.4, 3.0, SPEECH_CATEGORY_ATTACKING_TARGETS, 10.0, vehicle_destroyed_wingman_comments [val].introduction, array_type, speech_index ); } } } }