|
Wing Commander II
Reconstructed Win32 source (1996)
|
Ship intelligence and missions. More...
#include "game.h"Go to the source code of this file.
Macros | |
| #define | BRAINS_C |
Functions | |
| void | cruise_home (short obj) |
| void | fail (short obj) |
| void | coming_home (short obj) |
| void | run_away (short obj) |
| short | check_engage_target (short obj) |
| short | check_destroy_target (short obj) |
| void | maneuvering (short obj, short newTarget) |
| void | formation_burst (short obj) |
| void | disallow_engage (void) |
| void | allow_engage (void) |
| void | engage (short obj, short target, short objective) |
| void | send_message (short obj, signed char message) |
| short | attacker_in_range (short obj, unsigned short range) |
| void | fire_afterburner (short obj, short time) |
| short | real_velocity (short obj) |
| void | try2allow_engage (short obj) |
| void | point_ship_at_object (short obj, short other) |
| unsigned int | approach_ship_speed (short obj, short other) |
| unsigned int | change_mission_type (short obj, short missionType) |
| short | facing_to_object (short obj, FixedVector *point) |
| short | distance_from_point (short obj, const FixedVector *point) |
| void | wingman_mission (short obj) |
| void | imperial_formation (short obj) |
| void | formation_break (short obj) |
| void | imperial_wingman (short obj) |
| void | kilrathi_wingman (short obj) |
| short | dist_from_home (short obj) |
| short | scan_and_lock (short obj, short newTactic) |
| void | patrol_area (short obj) |
| void | kilrathi_patrol (short obj) |
| void | cruise_to_destination (short obj) |
| void | prepare_for_jump (short obj) |
| unsigned int | reset_tactic (short ship, short tactic) |
| void | accelerate_and_jump (short obj) |
| void | reach_warp (short obj) |
| void | split_patrol_mission (short obj) |
| void | warp_arrival (short obj) |
| void | return_to_buddy (short obj, short buddy) |
| void | escort_buddy (short obj, short buddy) |
| void | escort_mission (short obj) |
| void | check_goal (short obj) |
| void | streak_toward (short obj, short goal, short range) |
| void | approach_and_engage (short obj, short goal) |
| void | strike_mission (short obj) |
| void | return_to_master (short obj, short master) |
| void | defend_mission (short obj) |
| void | rendezvous_mission (short obj) |
| void | ship_intelligence (short obj) |
| void | orbit_sphere (short obj) |
| void | tanker_intelligence (short obj) |
| void | destroyer_intelligence (short obj) |
| void | point_capital_ship_at_object (short obj, short other) |
| void | stationary_intelligence (short obj) |
| void | SpawnCapitalFlakProjectile (short weapon, short obj, int x, int y, int z) |
| int | send_at_point (short obj, FixedVector *point, short speed) |
| void | get_facing_range_from_object (short obj, short other) |
| short | unactive (short ship) |
| void | capital_ship_strike_mission (short obj) |
| void | capital_ship_intelligence (short obj) |
| void | futurion_intelligence (short obj) |
| void | heat_seeking_missile_intelligence (short obj) |
| void | point_ship (short obj, short turnRate, const FixedVector *direction) |
| short | explode (short attacker, short victim) |
| short | distance_from_object (short obj, short other) |
| void | FF_missile_intelligence (short obj) |
| void | chaff_intelligence (short obj) |
| void | mine_intelligence (short obj) |
Variables | |
| short | g_nEnemySighting = 0x7fff |
| short | g_bHomeObjectiveFlagged = 0 |
| short | g_asShipIntelState [10] = { 0 } |
| short | g_2_asFlakCooldownTable [16] |
| short | g_asSpikeriCooldown [16] |
| short | g_asSpikeriLaunchCountdown [10] |
Ship intelligence and missions.
Definition in file brains.c.
| void accelerate_and_jump | ( | short | obj | ) |
Definition at line 539 of file brains.c.
References accelerate_and_jump(), approach_full_speed(), g_asShipCount, and warp().
Referenced by accelerate_and_jump(), and reach_warp().
Definition at line 205 of file brains.c.
References allow_engage(), g_bEngageAllowed, and g_nAutoEngageTimer.
Referenced by allow_engage(), request(), and try2allow_engage().
| void approach_and_engage | ( | short | obj, |
| short | goal ) |
Definition at line 673 of file brains.c.
References approach_and_engage(), distance_from_object(), engage(), evaluate_damage(), g_acShipTarget, g_aeObjectClass, g_asObjectType, g_asPilotLevel, g_nTargetRange, init_formation_burst(), MaxShort(), MinShort(), OBJECT_CLASS_FUTURION, OBJECTIVE_DESTROY_SHIP, scan_for_enemy(), and streak_toward().
Referenced by approach_and_engage(), and strike_mission().
| void capital_ship_intelligence | ( | short | obj | ) |
Definition at line 1292 of file brains.c.
References approach_cruise_speed(), approach_full_speed(), capital_ship_intelligence(), capital_ship_strike_mission(), coming_home(), destroyer_intelligence(), fire_turrets(), g_acShipTarget, g_asObjectType, g_asShipMissionType, g_asShipSide, g_asShipTactic, g_nTargetShip, launch_carrier_fighter(), MISSION_TYPE_COME_HOME, MISSION_TYPE_GOTO_WARP, MISSION_TYPE_NONE, MISSION_TYPE_ROUT, MISSION_TYPE_STRIKE, MISSION_TYPE_WARP_ARRIVE, reach_warp(), regulate_turn(), reset_tactic(), run_away(), scan_for_enemy(), select_target(), SIDE_KILRATHI, stationary_intelligence(), TACTIC_NONE, TACTIC_SELF_DEFENSE, tanker_intelligence(), unactive(), and warp_arrival().
Referenced by capital_ship_intelligence(), and object_intelligence().
| void capital_ship_strike_mission | ( | short | obj | ) |
Definition at line 1025 of file brains.c.
References AddFixedVectors(), approach_speed(), approach_zero_speed(), capital_ship_strike_mission(), ComputeVectorDelta(), ObjectTypeData::damageCapacity, destroyer_intelligence(), distance_from_object(), find_ship_index(), fire_turrets(), FixedToShortSaturating(), g_2_asFlakCooldownTable, g_acObjectOwner, g_acObjectType, g_acShipSequence, g_acShipTarget, g_aeObjectClass, g_aObjectTypeData, g_aShipPosition, g_aShipVelocity, g_aShipWeapons, g_asObjectCollisionRadius, g_asObjectCounter, g_asObjectDamage, g_asShipMaximumVelocity, g_asShipMissionParameter, g_asShipSide, g_asSpikeriCooldown, g_asSpikeriLaunchCountdown, g_nFacingToTarget, g_vToTarget, get_facing_range_from_object(), ObjectTypeData::lifetime, ObjectTypeData::maximumVelocity, new_object(), NormalizeFixedVector(), OBJECT_CLASS_CAPITAL_SHIP, OBJECT_CLASS_SHIP, PlaySfxWaveFileByNumber(), point_capital_ship_at_object(), point_ship_at_object(), RandomBelowOrEqual(), RandomInRange(), RecordCannedSceneObjectEvent(), ScaleFixedVector(), send_at_point(), SpawnCapitalFlakProjectile(), ShipWeaponSlot::type, unactive(), Vector_magnitude(), FixedVector::x, FixedVector::y, FixedVector::z, and zero_vector().
Referenced by capital_ship_intelligence(), and capital_ship_strike_mission().
| void chaff_intelligence | ( | short | obj | ) |
Definition at line 1523 of file brains.c.
References chaff_intelligence(), distance_from_object(), explode(), g_acShipTarget, g_aeObjectClass, g_asObjectType, OBJECT_CLASS_MISSILE, OBJECT_DATA_CHAFF_POD, OBJECT_DATA_JAVELIN_HEAT_SEEKING_MISSILE, OBJECT_DATA_PILUM_FRIEND_OR_FOE_MISSILE, and OBJECT_DATA_SPICULUM_IMAGE_RECOGNITION_MISSILE.
Referenced by chaff_intelligence(), and object_intelligence().
| unsigned int change_mission_type | ( | short | obj, |
| short | missionType ) |
| short check_destroy_target | ( | short | obj | ) |
Definition at line 143 of file brains.c.
References check_destroy_target(), check_engage_target(), evaluate_damage(), find_ship_index(), g_acShipTarget, g_aeObjectClass, g_asPilotLevel, g_asShipMissionParameter, g_asShipSide, gone_ship(), MaxShort(), MinShort(), OBJECT_CLASS_FUTURION, RandomBelow(), and target_valid().
Referenced by check_destroy_target(), imperial_wingman(), and strike_mission().
| short check_engage_target | ( | short | obj | ) |
Definition at line 131 of file brains.c.
References check_engage_target(), detect_enemy_tail(), g_acShipTarget, select_target(), and target_valid().
Referenced by check_destroy_target(), check_engage_target(), defend_mission(), escort_mission(), imperial_wingman(), kilrathi_patrol(), kilrathi_wingman(), and rendezvous_mission().
| void check_goal | ( | short | obj | ) |
Definition at line 647 of file brains.c.
References check_goal(), g_asShipMissionParameter, gone_ship(), MISSION_TYPE_PATROL, MISSION_TYPE_ROUT, and reset_mission_type().
Referenced by check_goal(), and strike_mission().
| void coming_home | ( | short | obj | ) |
Definition at line 63 of file brains.c.
References approach_cruise_speed(), approach_ship_speed(), coming_home(), cruise_home(), distance_from_object(), fail(), find_objective(), find_ship_index(), g_13_stMissionHeaderBlock, g_aeObjectClass, g_aMissionObjectives, g_aShipDestination, g_asObjectCollisionRadius, g_asShipMissionType, g_asShipSide, g_asShipTactic, get_first_follow_point(), MissionHeader::homeMissionShip, MISSION_TYPE_ROUT, OBJECT_CLASS_SHIP, point_ship_behind_object(), MissionObjective::position, remove_object(), reset_tactic(), SIDE_IMPERIAL, TACTIC_CRUISE, TACTIC_HEAD_HOME, and TACTIC_NONE.
Referenced by capital_ship_intelligence(), coming_home(), run_away(), and ship_intelligence().
| void cruise_home | ( | short | obj | ) |
Definition at line 14 of file brains.c.
References abandoned(), approach_cruise_speed(), CanSetNewShipTurnGoal(), cruise_home(), distance_from_object(), distance_from_point(), equ_vector(), fire_afterburner(), flag_objective(), g_abFlightPath, g_abShipNavPointIndex, g_abShipTurn, g_aeObjectClass, g_aMissionObjectives, g_aShipDestination, g_aShipMissionSpot, g_aShipVelocity, g_asObjectType, g_asShipSide, get_follow_point(), normal_speed(), OBJECT_CLASS_CAPITAL_SHIP, OBJECT_CLASS_SHIP, point_ship_at_point(), remove_object(), reset_tactic(), set_special(), SPECIAL_MANEUVER_KILL_ENGINES, TACTIC_HEAD_HOME, and zero_vector().
Referenced by coming_home(), and cruise_home().
| void cruise_to_destination | ( | short | obj | ) |
Definition at line 464 of file brains.c.
References abandoned(), approach_cruise_speed(), approach_full_speed(), approach_half_speed(), CanSetNewShipTurnGoal(), cruise_to_destination(), distance_from_point(), equ_vector(), fire_turrets(), flag_reached(), g_abFlightPath, g_abShipNavPointIndex, g_abShipTurn, g_acShipNavPoint, g_acShipTarget, g_aShipDestination, g_aShipMissionSpot, g_asShipMissionParameter, g_asShipSide, g_nCurrentNavPoint, g_nFacingToTarget, get_facing_range_from_object(), get_follow_point(), point_ship_at_point(), reset_tactic(), scan_for_enemy(), set_special(), SIDE_IMPERIAL, SPECIAL_MANEUVER_KILL_ENGINES, and TACTIC_SIT_STILL.
Referenced by cruise_to_destination(), reach_warp(), and strike_mission().
| void defend_mission | ( | short | obj | ) |
Definition at line 782 of file brains.c.
References approach_half_speed(), CanSetNewShipTurnGoal(), change_mission_type(), check_engage_target(), defend_mission(), distance_from_object(), engage(), fail(), find_ship_index(), g_abShipTurn, g_acShipTarget, g_aeShipObjective, g_asShipMissionParameter, g_nTargetRange, g_nTargetShip, in_danger(), maneuvering(), MISSION_TYPE_PATROL, OBJECTIVE_ENGAGE_ENEMY, OBJECTIVE_HOME_BASE, OBJECTIVE_NONE, OBJECTIVE_WANDER, point_perpendicular(), reset_objective(), return_to_master(), and scan_for_enemy().
Referenced by defend_mission(), and ship_intelligence().
| void destroyer_intelligence | ( | short | obj | ) |
Definition at line 955 of file brains.c.
References approach_cruise_speed(), approach_half_speed(), destroyer_intelligence(), fire_turrets(), g_acShipTarget, and orbit_sphere().
Referenced by capital_ship_intelligence(), capital_ship_strike_mission(), and destroyer_intelligence().
Definition at line 199 of file brains.c.
References disallow_engage(), and g_bEngageAllowed.
Referenced by disallow_engage(), and request().
| short dist_from_home | ( | short | obj | ) |
Definition at line 381 of file brains.c.
References dist_from_home(), distance_from_point(), and g_aShipMissionSpot.
Referenced by dist_from_home(), and patrol_area().
| short distance_from_point | ( | short | obj, |
| const FixedVector * | point ) |
| void escort_buddy | ( | short | obj, |
| short | buddy ) |
Definition at line 603 of file brains.c.
References approach_ship_speed(), CanSetNewShipTurnGoal(), escort_buddy(), and point_parallel().
Referenced by escort_buddy(), and escort_mission().
| void escort_mission | ( | short | obj | ) |
Definition at line 611 of file brains.c.
References change_mission_type(), check_engage_target(), distance_from_object(), engage(), escort_buddy(), escort_mission(), fail(), find_ship_index(), g_abShipTurn, g_aeShipObjective, g_asShipMissionParameter, g_nTargetRange, g_nTargetShip, in_danger(), maneuvering(), MISSION_TYPE_PATROL, OBJECTIVE_ENGAGE_ENEMY, OBJECTIVE_HOME_BASE, OBJECTIVE_NONE, OBJECTIVE_WANDER, reset_objective(), return_to_buddy(), and unactive().
Referenced by escort_mission(), and ship_intelligence().
| short facing_to_object | ( | short | obj, |
| FixedVector * | point ) |
| void fail | ( | short | obj | ) |
Definition at line 57 of file brains.c.
References fail(), OBJECTIVE_NONE, and reset_objective().
Referenced by coming_home(), defend_mission(), escort_mission(), fail(), imperial_wingman(), kilrathi_patrol(), kilrathi_wingman(), patrol_area(), reach_warp(), ship_intelligence(), and strike_mission().
| void FF_missile_intelligence | ( | short | obj | ) |
Definition at line 1463 of file brains.c.
References distance_from_object(), FF_missile_intelligence(), g_acObjectOwner, g_acShipCommunicator, g_acShipTarget, g_acViableTarget, g_aeObjectClass, g_anShipSpeed, g_asObjectType, g_asShipSide, g_asShipTactic, g_asViableTargetDistance, g_cViableTargetCount, g_nTargetRange, g_vToTarget, get_ship_max_velocity(), OBJECT_CLASS_NULL, OBJECT_CLASS_SHIP, OBJECT_DATA_CHAFF_POD, point_ship(), point_ship_at_object(), SortViableTargetsByDistance(), and TACTIC_RAM.
Referenced by FF_missile_intelligence(), and object_intelligence().
| void formation_break | ( | short | obj | ) |
Definition at line 289 of file brains.c.
References CanSetNewShipTurnGoal(), engage(), formation_break(), g_acShipSequence, g_acShipTarget, g_anPitchGoal, g_anRollGoal, g_anYawGoal, OBJECTIVE_ENGAGE_ENEMY, and steady_object().
Referenced by formation_break(), and imperial_wingman().
| void formation_burst | ( | short | obj | ) |
Definition at line 182 of file brains.c.
References approach_full_speed(), CanSetNewShipTurnGoal(), engage(), formation_burst(), g_acShipTarget, g_aShipDestination, g_asShipCount, g_asShipMissionType, MISSION_TYPE_STRIKE, OBJECTIVE_DESTROY_SHIP, OBJECTIVE_ENGAGE_ENEMY, and point_ship().
Referenced by formation_burst(), kilrathi_patrol(), kilrathi_wingman(), and strike_mission().
| void futurion_intelligence | ( | short | obj | ) |
Definition at line 1370 of file brains.c.
References futurion_intelligence(), g_aeObjectClass, g_asActionCount, g_asObjectCounter, g_nFacingToTarget, g_nTargetRange, and get_facing_range_from_object().
Referenced by futurion_intelligence(), object_intelligence(), and update_objects_in_space().
| void heat_seeking_missile_intelligence | ( | short | obj | ) |
Definition at line 1389 of file brains.c.
References distance_from_object(), explode(), g_acShipExhaustHeat, g_acShipTarget, g_acViableTarget, g_aeObjectClass, g_anShipSpeed, g_asObjectType, g_asViableTargetDistance, g_cViableTargetCount, g_nFacingToTarget, g_nTargetFacing, g_nTargetRange, g_vToTarget, get_facing_range_from_object(), get_ship_max_velocity(), heat_seeking_missile_intelligence(), OBJECT_CLASS_CAPITAL_SHIP, OBJECT_CLASS_NULL, OBJECT_CLASS_SHIP, OBJECT_DATA_CHAFF_POD, point_ship(), point_ship_at_object(), and SortViableTargetsByDistance().
Referenced by heat_seeking_missile_intelligence(), and object_intelligence().
| void imperial_formation | ( | short | obj | ) |
Definition at line 244 of file brains.c.
References any_enemy(), approach_ship_speed(), attacker_in_range(), distance_from_object(), engage(), facing_to_object(), fire_afterburner(), g_aeSpecialManeuver, g_aShipPosition, g_asShipWingLeader, g_bEngageAllowed, g_nAutoEngageTimer, g_nCurrentView, g_nCurrentWave, g_nEnemySighting, g_nTargetShip, g_nYourWingman, imperial_formation(), maintain_formation(), message_showing(), OBJECTIVE_ENGAGE_ENEMY, point_ship_at_object(), real_velocity(), send_message(), SPECIAL_MANEUVER_NONE, and try2allow_engage().
Referenced by imperial_formation(), and imperial_wingman().
| void imperial_wingman | ( | short | obj | ) |
Definition at line 310 of file brains.c.
References check_destroy_target(), check_engage_target(), fail(), formation_break(), g_aeShipObjective, imperial_formation(), imperial_wingman(), maneuvering(), OBJECTIVE_BREAK_FORMATION, OBJECTIVE_DESTROY_SHIP, OBJECTIVE_ENGAGE_ENEMY, OBJECTIVE_HOLD_FORMATION, OBJECTIVE_NONE, and reset_objective().
Referenced by imperial_wingman(), split_patrol_mission(), and wingman_mission().
| void kilrathi_patrol | ( | short | obj | ) |
Definition at line 441 of file brains.c.
References check_engage_target(), fail(), formation_burst(), g_aeShipObjective, g_asShipTactic, kilrathi_patrol(), maneuvering(), OBJECTIVE_BREAK_FORMATION, OBJECTIVE_ENGAGE_ENEMY, OBJECTIVE_HOLD_FORMATION, OBJECTIVE_NONE, OBJECTIVE_WANDER, patrol_area(), and TACTIC_APPROACH_TARGET.
Referenced by kilrathi_patrol(), and ship_intelligence().
| void kilrathi_wingman | ( | short | obj | ) |
Definition at line 334 of file brains.c.
References change_mission_type(), check_engage_target(), engage(), fail(), formation_burst(), g_acShipTarget, g_aeShipObjective, g_asShipWingLeader, inherit_leader(), kilrathi_wingman(), maintain_formation(), maneuvering(), MISSION_TYPE_PATROL, OBJECTIVE_BREAK_FORMATION, OBJECTIVE_DESTROY_SHIP, OBJECTIVE_ENGAGE_ENEMY, OBJECTIVE_HOLD_FORMATION, OBJECTIVE_NONE, reset_objective(), and unactive().
Referenced by kilrathi_wingman(), and wingman_mission().
| void maneuvering | ( | short | obj, |
| short | newTarget ) |
Definition at line 174 of file brains.c.
References g_acShipTarget, intelligence_events(), maneuvering(), and perform_maneuver().
Referenced by defend_mission(), escort_mission(), imperial_wingman(), kilrathi_patrol(), kilrathi_wingman(), maneuvering(), rendezvous_mission(), and strike_mission().
| void mine_intelligence | ( | short | obj | ) |
Definition at line 1550 of file brains.c.
References distance_from_object(), explode(), g_acObjectType, g_aeObjectClass, g_aObjectTypeData, g_asObjectCounter, mine_intelligence(), OBJECT_CLASS_SHIP, and RandomBelowOrEqual().
Referenced by mine_intelligence(), and object_intelligence().
| void orbit_sphere | ( | short | obj | ) |
Definition at line 914 of file brains.c.
References CanSetNewShipTurnGoal(), distance_from_point(), g_aMissionNavPoints, g_nCurrentNavPoint, orbit_sphere(), point_perpendicular_to_point(), point_ship_at_point(), MissionNavPoint::position, MissionNavPoint::proximityRadius, and trim_goals().
Referenced by destroyer_intelligence(), orbit_sphere(), and tanker_intelligence().
| void patrol_area | ( | short | obj | ) |
Definition at line 396 of file brains.c.
References alter_tactic(), approach_cruise_speed(), approach_full_speed(), CanSetNewShipTurnGoal(), dist_from_home(), fail(), g_acShipTarget, g_aShipMissionSpot, g_asShipTactic, g_nTargetRange, get_facing_range_from_object(), get_facing_range_from_point(), init_formation_burst(), patrol_area(), point_ship_at_object(), point_ship_at_point(), reset_tactic(), scan_and_lock(), TACTIC_APPROACH_TARGET, TACTIC_HEAD_HOME, TACTIC_LOOK_OUT, TACTIC_NONE, trim_goals(), and unactive().
Referenced by kilrathi_patrol(), and patrol_area().
| void point_ship | ( | short | obj, |
| short | turnRate, | ||
| const FixedVector * | direction ) |
| void prepare_for_jump | ( | short | obj | ) |
Definition at line 511 of file brains.c.
References CanSetNewShipTurnGoal(), fire_afterburner(), g_anShipSpeed, g_anYawGoal, g_asShipCount, g_asShipSide, g_nFacingToTarget, g_nTargetFacing, g_nTargetRange, get_facing_range_from_object(), prepare_for_jump(), reset_tactic(), set_special(), SIDE_KILRATHI, signed_random(), SPECIAL_MANEUVER_STOP_DRIFT, and TACTIC_WARP_OUT.
Referenced by prepare_for_jump(), and reach_warp().
| void reach_warp | ( | short | obj | ) |
Definition at line 547 of file brains.c.
References accelerate_and_jump(), cruise_to_destination(), fail(), g_aShipDestination, g_asShipTactic, get_first_follow_point(), prepare_for_jump(), reach_warp(), reset_tactic(), TACTIC_CRUISE, TACTIC_NONE, TACTIC_SIT_STILL, and TACTIC_WARP_OUT.
Referenced by capital_ship_intelligence(), reach_warp(), and ship_intelligence().
| void rendezvous_mission | ( | short | obj | ) |
Definition at line 828 of file brains.c.
References approach_cruise_speed(), approach_full_speed(), attacker_in_range(), CanSetNewShipTurnGoal(), change_mission_type(), check_engage_target(), distance_from_object(), engage(), find_ship_index(), g_aeShipObjective, g_asShipMissionParameter, g_nTargetShip, maneuvering(), MISSION_TYPE_DEFEND, MISSION_TYPE_PATROL, OBJECTIVE_ENGAGE_ENEMY, OBJECTIVE_REACH_SHIP, point_ship_at_object(), rendezvous_mission(), reset_mission_type(), reset_objective(), and unactive().
Referenced by rendezvous_mission(), and ship_intelligence().
| void return_to_buddy | ( | short | obj, |
| short | buddy ) |
Definition at line 591 of file brains.c.
References approach_cruise_speed(), CanSetNewShipTurnGoal(), distance_from_object(), OBJECTIVE_WANDER, point_parallel(), point_ship_at_object(), reset_objective(), and return_to_buddy().
Referenced by escort_mission(), and return_to_buddy().
| void return_to_master | ( | short | obj, |
| short | master ) |
Definition at line 770 of file brains.c.
References distance_from_object(), OBJECTIVE_WANDER, point_perpendicular(), reset_objective(), return_to_master(), and streak_toward().
Referenced by defend_mission(), and return_to_master().
| void run_away | ( | short | obj | ) |
Definition at line 101 of file brains.c.
References any_enemy(), approach_full_speed(), coming_home(), distance_from_object(), fire_afterburner(), g_asShipMissionType, g_asShipSide, g_asShipWingLeader, maintain_formation(), MISSION_TYPE_ROUT, normal_speed(), point_ship(), RandomBelow(), remove_object(), run_away(), SIDE_IMPERIAL, unactive(), FixedVector::y, and zero_vector().
Referenced by capital_ship_intelligence(), run_away(), and ship_intelligence().
| short scan_and_lock | ( | short | obj, |
| short | newTactic ) |
Definition at line 387 of file brains.c.
References g_acShipTarget, g_asShipTactic, scan_and_lock(), and scan_for_enemy().
Referenced by patrol_area(), and scan_and_lock().
| int send_at_point | ( | short | obj, |
| FixedVector * | point, | ||
| short | speed ) |
| void ship_intelligence | ( | short | obj | ) |
Definition at line 861 of file brains.c.
References approach_cruise_speed(), coming_home(), defend_mission(), escort_mission(), fail(), g_acShipCollisionCooldown, g_asShipMissionType, inherit_leader_mission(), kilrathi_patrol(), MISSION_TYPE_COME_HOME, MISSION_TYPE_DEFEND, MISSION_TYPE_ESCORT, MISSION_TYPE_GOTO_WARP, MISSION_TYPE_NONE, MISSION_TYPE_PATROL, MISSION_TYPE_RENDEZVOUS, MISSION_TYPE_ROUT, MISSION_TYPE_SPLIT_PATROL, MISSION_TYPE_STRIKE, MISSION_TYPE_WARP_ARRIVE, MISSION_TYPE_WINGMAN, reach_warp(), regulate_turn(), rendezvous_mission(), run_away(), ship_intelligence(), split_patrol_mission(), strike_mission(), warp_arrival(), and wingman_mission().
Referenced by object_intelligence(), and ship_intelligence().
| void SpawnCapitalFlakProjectile | ( | short | weapon, |
| short | obj, | ||
| int | x, | ||
| int | y, | ||
| int | z ) |
Definition at line 986 of file brains.c.
References AddFixedVectors(), ComputeVectorDelta(), ObjectTypeData::damageCapacity, g_acObjectOwner, g_acObjectType, g_acShipTarget, g_aObjectTypeData, g_aShipPosition, g_asObjectCounter, g_asObjectDamage, ObjectTypeData::lifetime, ObjectTypeData::maximumVelocity, new_object(), NormalizeFixedVector(), RecordCannedSceneObjectEvent(), ScaleFixedVector(), send_at_point(), SpawnCapitalFlakProjectile(), and zero_vector().
Referenced by capital_ship_strike_mission(), and SpawnCapitalFlakProjectile().
| void split_patrol_mission | ( | short | obj | ) |
Definition at line 569 of file brains.c.
References g_acShipNavPoint, g_aeShipObjective, g_asShipMissionParameter, g_asShipWingLeader, g_nCurrentNavPoint, imperial_wingman(), OBJECTIVE_HOLD_FORMATION, and split_patrol_mission().
Referenced by ship_intelligence(), and split_patrol_mission().
| void stationary_intelligence | ( | short | obj | ) |
Definition at line 969 of file brains.c.
References fire_turrets(), g_acShipTarget, g_aeObjectClass, g_anObjectYawRotation, g_asShipMissionType, g_asShipSide, MISSION_TYPE_STRIKE, OBJECT_CLASS_BASE, OBJECT_CLASS_CAPITAL_SHIP, and stationary_intelligence().
Referenced by capital_ship_intelligence(), object_intelligence(), and stationary_intelligence().
| void streak_toward | ( | short | obj, |
| short | goal, | ||
| short | range ) |
Definition at line 656 of file brains.c.
References approach_full_speed(), CanSetNewShipTurnGoal(), fire_afterburner(), normal_speed(), point_ship_at_object(), RandomBelow(), streak_toward(), and veer_random().
Referenced by approach_and_engage(), return_to_master(), and streak_toward().
| void strike_mission | ( | short | obj | ) |
Definition at line 708 of file brains.c.
References approach_and_engage(), change_mission_type(), check_destroy_target(), check_goal(), cruise_to_destination(), fail(), find_ship_index(), flag_objective(), formation_burst(), g_13_stMissionHeaderBlock, g_aeObjectClass, g_aeShipObjective, g_aMissionShips, g_aShipDestination, g_aShipMissionSpot, g_asShipMissionIndex, g_asShipMissionParameter, g_asShipTactic, g_bHomeObjectiveFlagged, g_cCurrentObjective, get_first_follow_point(), MissionHeader::homeMissionShip, is_team_member(), locate_ship(), maneuvering(), OBJECT_CLASS_FUTURION, OBJECTIVE_BREAK_FORMATION, OBJECTIVE_DESTROY_SHIP, OBJECTIVE_ENGAGE_ENEMY, OBJECTIVE_HOLD_FORMATION, OBJECTIVE_HOME_BASE, OBJECTIVE_NONE, reset_objective(), reset_tactic(), set_next_destination(), strike_mission(), TACTIC_CRUISE, and TACTIC_NONE.
Referenced by ship_intelligence(), and strike_mission().
| void tanker_intelligence | ( | short | obj | ) |
Definition at line 932 of file brains.c.
References approach_cruise_speed(), approach_full_speed(), attacker_in_range(), CanSetNewShipTurnGoal(), fire(), g_acShipTarget, g_anRollGoal, g_anYawGoal, g_nTargetShip, get_facing_range_from_object(), orbit_sphere(), point_capital_ship_at_object(), RandomBelowOrEqual(), signed_random(), and tanker_intelligence().
Referenced by capital_ship_intelligence(), and tanker_intelligence().
| void try2allow_engage | ( | short | obj | ) |
Definition at line 218 of file brains.c.
References allow_engage(), ShipIntelligenceMetadata::engagementMode, g_nAutoEngageTimer, g_nYourWingman, g_stWingmanIntelligence, RandomBelowOrEqual(), and try2allow_engage().
Referenced by imperial_formation(), and try2allow_engage().
| void warp_arrival | ( | short | obj | ) |
Definition at line 582 of file brains.c.
References arrive_from_warp(), g_asShipTactic, reset_tactic(), TACTIC_WARP_IN, and warp_arrival().
Referenced by capital_ship_intelligence(), ship_intelligence(), and warp_arrival().
| void wingman_mission | ( | short | obj | ) |
Definition at line 371 of file brains.c.
References g_asShipSide, imperial_wingman(), kilrathi_wingman(), SIDE_IMPERIAL, and wingman_mission().
Referenced by ship_intelligence(), and wingman_mission().
| short g_2_asFlakCooldownTable[16] |
Definition at line 1573 of file brains.c.
Referenced by capital_ship_strike_mission(), house_keep_objects(), and Set_up_ship_info().
| short g_asShipIntelState[10] = { 0 } |
Definition at line 11 of file brains.c.
Referenced by ejection_sequence(), and init_intelligence_data().
| short g_asSpikeriCooldown[16] |
Definition at line 1574 of file brains.c.
Referenced by capital_ship_strike_mission(), house_keep_objects(), and Set_up_ship_info().
| short g_asSpikeriLaunchCountdown[10] |
Definition at line 1575 of file brains.c.
Referenced by capital_ship_strike_mission(), and Set_up_ship_info().
| short g_bHomeObjectiveFlagged = 0 |
Definition at line 10 of file brains.c.
Referenced by strike_mission().
| short g_nEnemySighting = 0x7fff |
Definition at line 9 of file brains.c.
Referenced by imperial_formation(), and set_up_action_sphere().