mirror of
https://github.com/astromaddie/HaloCE-VR.git
synced 2026-10-25 03:00:15 +01:00
Integrate coherent B3, P2/K17 prerequisites, completed K1-K16 + S, and the independent profile/effects rulings. Five gains and two explicitly approved B3 debits: net +3 strict functions, +2770 meaningful/+2800 padded bytes (+2774 progress credit). No additional losses; Halo objects 394 to 396 and data unchanged. Clean rebuild, identical 8252-row stable sweep, 68 valid parks, admission/provider checks, 467-unit warning comparison, unchanged fake scan, and 1318 tests passed. Preserve canonical helper recoveries and unrelated work. Full evidence and disclosures in docs/object_matching_logs/astra_five_function_reconciliation_20260928.md.
1581 lines
39 KiB
C
1581 lines
39 KiB
C
/*
|
|
ACTORS.H
|
|
|
|
header included in hcex build.
|
|
*/
|
|
|
|
#ifndef __ACTORS_H
|
|
#define __ACTORS_H
|
|
#pragma once
|
|
|
|
/* ---------- headers */
|
|
|
|
#include "actions.h"
|
|
#include "path.h"
|
|
|
|
#include "math/real_math.h"
|
|
#include "objects/objects.h"
|
|
|
|
/* ---------- constants */
|
|
|
|
enum
|
|
{
|
|
NUMBER_OF_DISCARDED_FIRING_POSITIONS_PER_ACTOR = 4,
|
|
};
|
|
|
|
enum
|
|
{
|
|
MAXIMUM_ACTORS = 256,
|
|
MAXIMUM_SWARMS = 32,
|
|
MAXIMUM_SWARM_COMPONENTS = 256,
|
|
SWARM_COMPONENT_DATUM_SIZE = 0x40,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_swarm_component_attacking_in_melee_bit = 0,
|
|
_swarm_component_attached_to_unit_bit,
|
|
_swarm_component_wander_bit,
|
|
_swarm_component_obey_bit,
|
|
_swarm_component_obey_desire_jump_bit,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_actor_target_none = 0,
|
|
_actor_target_partial_enemy,
|
|
_actor_target_dead_enemy,
|
|
_actor_target_disregarded_orphan,
|
|
_actor_target_inspected_orphan,
|
|
_actor_target_uninspected_orphan,
|
|
_actor_target_definite_orphan,
|
|
_actor_target_acknowledged_enemy,
|
|
_actor_target_clear_line_of_sight_enemy,
|
|
_actor_target_potentially_dangerous_enemy,
|
|
_actor_target_visible_enemy,
|
|
_actor_target_damaging_enemy,
|
|
NUMBER_OF_ACTOR_TARGET_TYPES,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_primary_priority_none = 0,
|
|
_primary_priority_face_360,
|
|
_primary_priority_opportunity_aiming,
|
|
_primary_priority_facing,
|
|
_primary_priority_exact_facing,
|
|
_primary_priority_aiming,
|
|
_primary_priority_locked_facing,
|
|
_primary_priority_locked_aiming,
|
|
NUMBER_OF_PRIMARY_LOOK_TYPES,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_secondary_look_none = 0,
|
|
_secondary_look_environmental_noise,
|
|
_secondary_look_started_moving_prop,
|
|
_secondary_look_weapon_impact,
|
|
_secondary_look_newly_acknowledged_prop,
|
|
_secondary_look_bumped_prop,
|
|
_secondary_look_detonation,
|
|
_secondary_look_shooting_prop,
|
|
_secondary_look_communicating_prop,
|
|
_secondary_look_communicated_direction,
|
|
_secondary_look_combat_stimulus_prop,
|
|
_secondary_look_damage,
|
|
_secondary_look_dangerous_object,
|
|
_secondary_look_scripted,
|
|
NUMBER_OF_SECONDARY_LOOK_TYPES,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_secondary_look_priority_none = 0,
|
|
_secondary_look_priority_default,
|
|
_secondary_look_priority_idle_look,
|
|
_secondary_look_priority_idle_aim,
|
|
_secondary_look_priority_aim,
|
|
_secondary_look_priority_turn_and_aim,
|
|
_secondary_look_priority_stop_and_aim,
|
|
_secondary_look_priority_override,
|
|
_secondary_look_priority_override_exact_facing,
|
|
NUMBER_OF_SECONDARY_LOOK_PRIORITIES,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_actor_threat_none = 0,
|
|
_actor_threat_visible,
|
|
_actor_threat_visible_facing_me,
|
|
_actor_threat_visible_aiming_at_me,
|
|
_actor_threat_shooting,
|
|
_actor_threat_shooting_near_me,
|
|
_actor_threat_shooting_at_me,
|
|
_actor_threat_extremely_close_to_me,
|
|
_actor_threat_damaging_me,
|
|
NUMBER_OF_ACTOR_THREAT_TYPES,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_actor_action_none = 0,
|
|
_actor_action_sleep,
|
|
_actor_action_alert,
|
|
_actor_action_fight,
|
|
_actor_action_flee,
|
|
_actor_action_uncover,
|
|
_actor_action_guard,
|
|
_actor_action_search,
|
|
_actor_action_wait,
|
|
_actor_action_vehicle,
|
|
_actor_action_charge,
|
|
_actor_action_obey,
|
|
_actor_action_converse,
|
|
_actor_action_avoid,
|
|
NUMBER_OF_ACTOR_ACTIONS,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_actor_postcombat_none = 0,
|
|
_actor_postcombat_speak_alone,
|
|
_actor_postcombat_speak_unscathed,
|
|
_actor_postcombat_speak_wounded,
|
|
_actor_postcombat_speak_massacre,
|
|
_actor_postcombat_speak_triumph,
|
|
_actor_postcombat_run_to,
|
|
_actor_postcombat_check_enemy,
|
|
_actor_postcombat_check_friend,
|
|
_actor_postcombat_shoot_corpse,
|
|
_actor_postcombat_celebrate,
|
|
NUMBER_OF_ACTOR_POSTCOMBAT_ACTIONS,
|
|
};
|
|
|
|
enum destination_type
|
|
{
|
|
_destination_none = 0,
|
|
_destination_halt,
|
|
_destination_raw_location,
|
|
_destination_firing_position,
|
|
_destination_move_position,
|
|
_destination_prop,
|
|
NUMBER_OF_DESTINATION_TYPES,
|
|
};
|
|
|
|
enum actor_vehicle_driver_type
|
|
{
|
|
_actor_vehicle_driver_none = 0,
|
|
_actor_vehicle_driver_unknown,
|
|
_actor_vehicle_driver_hovering_ground,
|
|
_actor_vehicle_driver_nondirectional_ground,
|
|
_actor_vehicle_driver_directional_flying,
|
|
NUMBER_OF_ACTOR_VEHICLE_DRIVER_TYPES,
|
|
};
|
|
|
|
enum actor_danger_zone_type
|
|
{
|
|
_actor_danger_zone_none = 0,
|
|
_actor_danger_zone_suicide,
|
|
_actor_danger_zone_projectile,
|
|
_actor_danger_zone_vehicle,
|
|
number_of_actor_danger_zone_types,
|
|
};
|
|
|
|
enum actor_danger_zone_hostility
|
|
{
|
|
_actor_danger_hostility_enemy = 0,
|
|
_actor_danger_hostility_friend,
|
|
_actor_danger_hostility_self,
|
|
NUMBER_OF_ACTOR_DANGER_ZONE_HOSTILITIES,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_actor_fire_state_none = 0,
|
|
_actor_fire_state_holding,
|
|
_actor_fire_state_bursting,
|
|
_actor_fire_state_pausing,
|
|
_actor_fire_state_wild,
|
|
NUMBER_OF_ACTOR_FIRE_STATES,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_actor_vector_avoidance_clear = 0,
|
|
_actor_vector_avoidance_obstructed_object,
|
|
_actor_vector_avoidance_obstructed_structure,
|
|
NUMBER_OF_ACTOR_VEHICLE_AVOIDANCE_RESULTS,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_direction_specification_movement = 0,
|
|
_direction_specification_prop,
|
|
_direction_specification_target,
|
|
_direction_specification_point,
|
|
_direction_specification_vector,
|
|
_direction_specification_danger,
|
|
_direction_specification_object,
|
|
NUMBER_OF_DIRECTION_SPECIFICATION_TYPES,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_actor_unopposable_danger_none = 0,
|
|
_actor_unopposable_danger_visible,
|
|
_actor_unopposable_danger_shooting,
|
|
_actor_unopposable_danger_shooting_nearby,
|
|
_actor_unopposable_danger_damaging,
|
|
_actor_unopposable_danger_retreat,
|
|
_actor_unopposable_danger_friends_retreating,
|
|
_actor_unopposable_danger_time_triggered,
|
|
_actor_unopposable_danger_immediately_triggered,
|
|
_actor_unopposable_danger_friends_killed,
|
|
NUMBER_OF_ACTOR_UNOPPOSABLE_DANGER_TYPES,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_actor_movement_type_alert = 0,
|
|
_actor_movement_type_asleep,
|
|
_actor_movement_type_combat,
|
|
_actor_movement_type_panic,
|
|
_actor_movement_type_flaming,
|
|
NUMBER_OF_ACTOR_MOVEMENT_TYPES,
|
|
};
|
|
|
|
|
|
enum
|
|
{
|
|
_actor_perception_none = 0,
|
|
_actor_perception_partial,
|
|
_actor_perception_full,
|
|
_actor_perception_unmistakable,
|
|
NUMBER_OF_ACTOR_PERCEPTION_TYPES,
|
|
};
|
|
|
|
#define MAXIMUM_NUMBER_OF_ACTORS 256
|
|
#define MAXIMUM_NUMBER_OF_ACTOR_PATHS 32
|
|
|
|
#define MAXIMUM_UNIT_INDICES_PER_SWARM 16
|
|
#define MAXIMUM_COMPONENT_INDICES_PER_SWARM 16
|
|
|
|
#define MAXIMUM_NUMBER_OF_AVOIDANCE_OBJECTS 1024
|
|
|
|
enum
|
|
{
|
|
_firing_point_evaluation_mode_fight = 0,
|
|
_firing_point_evaluation_mode_panic,
|
|
_firing_point_evaluation_mode_cover,
|
|
_firing_point_evaluation_mode_uncover,
|
|
_firing_point_evaluation_mode_guard,
|
|
_firing_point_evaluation_mode_pursue,
|
|
_firing_point_evaluation_mode_avoid,
|
|
NUMBER_OF_FIRING_POINT_EVALUATION_MODES,
|
|
};
|
|
|
|
enum
|
|
{
|
|
_firing_position_group_normal = 0,
|
|
_firing_position_group_when_searching,
|
|
_firing_position_group_when_not_searching,
|
|
};
|
|
|
|
#define MAXIMUM_NUMBER_OF_FIRING_POSITION_AVOID_POINTS 32
|
|
#define MAXIMUM_NUMBER_OF_FIRING_POSITION_ATTACK_VECTORS 32
|
|
|
|
/* ---------- macros */
|
|
|
|
#define actor_get(index) ((struct actor_datum *)datum_get(actor_data, (index)))
|
|
#define actor_try_and_get(index) ((struct actor_datum *)datum_try_and_get(actor_data, (index)))
|
|
|
|
#define swarm_get(index) ((struct swarm_datum *)datum_get(swarm_data, (index)))
|
|
#define swarm_try_and_get(index) ((struct swarm_datum *)datum_try_and_get(swarm_data, (index)))
|
|
|
|
#define swarm_component_get(index) \
|
|
((struct swarm_component_datum *)datum_get(swarm_component_data, (index)))
|
|
|
|
/* ---------- structures */
|
|
|
|
struct firing_position_definition;
|
|
|
|
struct firing_position_avoid_point
|
|
{
|
|
real radius;
|
|
real_point3d point;
|
|
};
|
|
|
|
struct firing_position_attack_vector
|
|
{
|
|
short type;
|
|
real_point3d point;
|
|
real_vector3d vector;
|
|
};
|
|
|
|
union firing_position_evaluation_data
|
|
{
|
|
struct
|
|
{
|
|
boolean forced_to_flee;
|
|
} panic;
|
|
struct
|
|
{
|
|
long orphan_prop_index;
|
|
long last_perceived_time;
|
|
boolean tenacious;
|
|
} pursue;
|
|
struct
|
|
{
|
|
boolean allow_occluded_points;
|
|
} cover;
|
|
};
|
|
|
|
/* January query/scoring context; the last six debug counters are absent in HCEA. */
|
|
struct firing_position_evaluation_context
|
|
{
|
|
unsigned long allowed_position_mask;
|
|
short evaluation_mode;
|
|
union firing_position_evaluation_data evaluation_data;
|
|
boolean allow_rejected_positions;
|
|
boolean allow_outside_range;
|
|
real maximum_allowable_range;
|
|
real maximum_search_range;
|
|
boolean specific_target_enable;
|
|
real_point3d specific_target_point;
|
|
long specific_target_surface_index;
|
|
short specific_target_cluster_index;
|
|
boolean attractor_enable;
|
|
real attractor_weight;
|
|
real attractor_radius;
|
|
boolean find_path_direction_from_actor;
|
|
boolean use_last_visible_target_position;
|
|
boolean find_path_distance_to_target;
|
|
boolean find_path_direction_from_target;
|
|
boolean flying;
|
|
boolean directional_driving;
|
|
boolean directional_driving_cannot_stop;
|
|
unsigned long preferred_groups;
|
|
real preferred_weight;
|
|
long avoid_point_count;
|
|
struct firing_position_avoid_point avoid_points[MAXIMUM_NUMBER_OF_FIRING_POSITION_AVOID_POINTS];
|
|
short attack_vector_count;
|
|
short friend_attack_vector_count;
|
|
short dangerous_enemy_attack_vector_count;
|
|
struct firing_position_attack_vector attack_vectors[MAXIMUM_NUMBER_OF_FIRING_POSITION_ATTACK_VECTORS];
|
|
boolean has_gun_offset_stand;
|
|
real_vector3d gun_offset_stand;
|
|
boolean has_gun_offset_crouch;
|
|
real_vector3d gun_offset_crouch;
|
|
boolean has_target;
|
|
real target_current_distance;
|
|
real_point3d target_point;
|
|
real_point3d target_head_position;
|
|
real_point3d target_line_of_sight_position;
|
|
boolean target_line_of_sight_optional;
|
|
long target_vehicle_index;
|
|
long target_pathfinding_surface_index;
|
|
real_point3d target_pathfinding_point;
|
|
short target_cluster_index;
|
|
long target_prop_index;
|
|
boolean target_has_hint_vector;
|
|
real_vector3d target_hint_vector;
|
|
real target_danger_radius;
|
|
boolean post_evaluation_bounded;
|
|
real post_evaluation_bound;
|
|
short debug_encounter_count;
|
|
short debug_considered_count;
|
|
short debug_valid_count;
|
|
short debug_nonrejected_count;
|
|
short debug_post_evaluated_count;
|
|
short debug_skipped_count;
|
|
};
|
|
|
|
/* Runtime candidate record, distinct from the scenario tag definition. */
|
|
struct firing_position
|
|
{
|
|
struct firing_position_definition *definition;
|
|
short original_index;
|
|
short line_of_sight;
|
|
real path_distance_from_actor;
|
|
real_vector3d path_direction_from_actor;
|
|
real path_distance_to_target;
|
|
real path_closest_approach_to_target;
|
|
real_vector3d path_direction_from_target;
|
|
real linear_distance_squared_to_target;
|
|
boolean valid;
|
|
boolean rejected;
|
|
real pre_evaluation;
|
|
real evaluation;
|
|
};
|
|
|
|
|
|
struct actor_meta_data
|
|
{
|
|
short type;
|
|
boolean swarm;
|
|
boolean frozen;
|
|
boolean active;
|
|
boolean encounterless;
|
|
boolean force_active;
|
|
boolean erase_next_tick;
|
|
long last_active_time;
|
|
short encounterless_active_timer;
|
|
boolean dormant_desire;
|
|
boolean dormant;
|
|
short become_dormant_timer;
|
|
long unit_index;
|
|
boolean unique_leader;
|
|
short swarm_unit_count;
|
|
short swarm_original_unit_count;
|
|
long swarm_unit_index;
|
|
long swarm_cache_index;
|
|
long next_actor_index;
|
|
long disconnected_encounter_index;
|
|
long encounter_index;
|
|
short disconnected_squad_index;
|
|
short squad_index;
|
|
short platoon_index;
|
|
short team_index;
|
|
boolean stored_prevehicle_encounter;
|
|
long prevehicle_encounter_index;
|
|
short prevehicle_squad_index;
|
|
short service_timer;
|
|
byte timeslice;
|
|
short highest_prop_timer;
|
|
long first_prop_index;
|
|
long interesting_orphan_index;
|
|
long definition_index;
|
|
long variant_definition_index;
|
|
};
|
|
|
|
struct actor_state_data
|
|
{
|
|
short initial_state;
|
|
short default_state;
|
|
long last_default_state_time;
|
|
char noncombat_sequence_id;
|
|
short mode;
|
|
short action;
|
|
short combat_status;
|
|
boolean action_changed;
|
|
short artificial_combat_status;
|
|
short suspicion_combat_status;
|
|
long suspicion_timer;
|
|
long combat_mode_timer;
|
|
long in_combat_timer;
|
|
long certain_combat_timer;
|
|
long uncertain_combat_timer;
|
|
boolean had_visible_enemy;
|
|
boolean been_in_combat;
|
|
boolean command_list_immediate;
|
|
short command_list_index;
|
|
short command_list_delay_timer;
|
|
long last_command_list_time;
|
|
boolean searching;
|
|
boolean flying;
|
|
struct action_state_data action_data;
|
|
};
|
|
|
|
struct actor_position_data
|
|
{
|
|
real_point3d head_position;
|
|
real_point3d body_position;
|
|
real_vector3d body_facing;
|
|
struct location body_location;
|
|
real_vector3d velocity;
|
|
};
|
|
|
|
struct actor_input_data
|
|
{
|
|
struct actor_position_data position;
|
|
long vehicle_index;
|
|
boolean in_midair;
|
|
boolean underwater;
|
|
short vehicle_driver_type;
|
|
boolean vehicle_passenger;
|
|
boolean vehicle_gunner;
|
|
boolean vehicle_gunner_bombardment;
|
|
long pathfinding_surface_index;
|
|
real_point3d pathfinding_point;
|
|
real_vector3d facing_vector;
|
|
real_vector3d aiming_vector;
|
|
real_vector3d looking_vector;
|
|
real_vector3d looking_left_vector;
|
|
real_vector3d looking_up_vector;
|
|
long delayed_attached_projectile_index;
|
|
boolean melee_attacker_attached;
|
|
boolean burning_to_death;
|
|
real body_vitality;
|
|
real shield_vitality;
|
|
real recent_body_damage;
|
|
real recent_shield_damage;
|
|
};
|
|
|
|
struct actor_external_orders
|
|
{
|
|
boolean stand_down;
|
|
boolean defending;
|
|
boolean playfighting;
|
|
boolean disable_charging;
|
|
boolean pursuit_is_coordinator;
|
|
long pursuit_group_prop_index;
|
|
short desired_target_type;
|
|
long desired_target_ai_index;
|
|
long conversation_index;
|
|
long conversation_attention_unit_index;
|
|
short postcombat_type;
|
|
long postcombat_prop_index;
|
|
};
|
|
|
|
struct actor_situation
|
|
{
|
|
char known_enemies;
|
|
char visible_reachable_enemies;
|
|
char specific_threats[9];
|
|
char cumulative_threats[9];
|
|
char area_friends;
|
|
char area_fighting_friends;
|
|
char area_fire_support_friends;
|
|
char area_friends_by_type[16];
|
|
char area_fighting_friends_by_type[16];
|
|
char visible_friends;
|
|
char visible_fighting_friends;
|
|
char visible_friends_by_type[16];
|
|
char visible_fighting_friends_by_type[16];
|
|
char close_friends;
|
|
char close_fighting_friends;
|
|
char close_friends_by_type[16];
|
|
char close_fighting_friends_by_type[16];
|
|
};
|
|
|
|
struct actor_target_data
|
|
{
|
|
short target_type;
|
|
short artificial_target_knowledge;
|
|
long target_last_visible_time;
|
|
long target_prop_index;
|
|
boolean any_target_ever;
|
|
long since_any_target_visible_timer;
|
|
boolean target_really_alive;
|
|
};
|
|
|
|
struct actor_danger_projectile
|
|
{
|
|
short time_until_explosion;
|
|
};
|
|
|
|
struct actor_danger_vehicle
|
|
{
|
|
word pad;
|
|
};
|
|
|
|
struct actor_danger_suicide
|
|
{
|
|
short time_until_death;
|
|
};
|
|
|
|
struct actor_danger_zone
|
|
{
|
|
short danger_type;
|
|
short hostility;
|
|
short acknowledgement_timer;
|
|
boolean currently_perceived;
|
|
boolean noticed_danger;
|
|
boolean allow_dive_evasion;
|
|
boolean communicated;
|
|
boolean attached_to_us;
|
|
long object_index;
|
|
long owner_unit_index;
|
|
real danger_radius;
|
|
real_point3d initial_position;
|
|
real_vector3d initial_velocity;
|
|
real_point3d position;
|
|
real_vector3d velocity;
|
|
real_point3d predict_danger_position;
|
|
real current_distance_from_actor;
|
|
real bounding_sphere_radius;
|
|
real_point3d bounding_sphere_center;
|
|
|
|
union
|
|
{
|
|
struct actor_danger_projectile projectile;
|
|
struct actor_danger_vehicle vehicle;
|
|
struct actor_danger_suicide suicide;
|
|
};
|
|
};
|
|
|
|
struct actor_stimulus_data
|
|
{
|
|
boolean was_damaged;
|
|
boolean vehicle_eviction;
|
|
short surprise_level;
|
|
boolean was_surprised;
|
|
long surprise_prop_index;
|
|
boolean surprise_has_vector;
|
|
real_vector3d surprise_vector;
|
|
short panic_type;
|
|
long panic_prop_index;
|
|
short berserk_type;
|
|
short combat_transition;
|
|
boolean combat_transition_guard_at_point;
|
|
real_point3d combat_transition_guard_point;
|
|
long combat_transition_guard_point_surface_index;
|
|
real combat_transition_guard_point_distance;
|
|
boolean combat_transition_has_vector;
|
|
real_vector3d combat_transition_vector;
|
|
long combat_transition_guard_timer;
|
|
long combat_transition_prop_index;
|
|
long combat_transition_prop_look_timer;
|
|
boolean combat_transition_prop_look_while_moving;
|
|
short suspicion_combat_status;
|
|
long suspicion_timer;
|
|
};
|
|
|
|
struct actor_emotion_data
|
|
{
|
|
real instantaneous_danger;
|
|
real perceived_danger;
|
|
boolean defensive_crouch;
|
|
short defensive_crouch_timer;
|
|
boolean crouch_blocking_player_line_of_fire;
|
|
boolean crouch_blocking_line_of_fire;
|
|
boolean crouch_friends_in_line_of_fire;
|
|
boolean moving_into_player_line_of_fire;
|
|
short moving_into_fire_timer;
|
|
boolean crouch_switching_active;
|
|
boolean crouch_switching_current_value;
|
|
short crouch_switching_change_timer;
|
|
short crouch_switching_stay_timer;
|
|
short evasion_delay_timer;
|
|
long last_defensive_cover_seeking_time;
|
|
long last_active_cover_seeking_time;
|
|
boolean currently_defending;
|
|
boolean forced_to_charge;
|
|
boolean ignorant_of_broken_surfaces;
|
|
boolean sighted_friendly_player;
|
|
boolean berserk;
|
|
boolean played_berserk_sound;
|
|
long last_melee_check_time;
|
|
long last_melee_attack_time;
|
|
long last_vehicle_check_time;
|
|
long last_vehicle_charge_time;
|
|
boolean last_vehicle_exit_forced;
|
|
long vehicle_ignore_index;
|
|
long vehicle_ignore_time;
|
|
long last_flee_failed_time;
|
|
long flee_with_friends_disable_time;
|
|
long corpse_ignore_time;
|
|
long unopposable_friend_ignore_time;
|
|
short unopposable_retreat_timer;
|
|
long unopposable_retreat_prop_index;
|
|
long unopposable_retreat_start_time;
|
|
real original_body_vitality;
|
|
};
|
|
|
|
struct actor_discarded_firing_position
|
|
{
|
|
byte temporary;
|
|
byte pad;
|
|
short index;
|
|
};
|
|
|
|
struct actor_firing_position_data
|
|
{
|
|
short current_position_index;
|
|
boolean current_position_found_outside_range;
|
|
boolean moved_away_from_firing_position;
|
|
boolean pursuit_fired_at_orphan;
|
|
boolean pursuit_communicated_lost_contact;
|
|
long pursuit_prop_index;
|
|
short pursuit_positions_count;
|
|
short next_discarded_firing_positions_entry;
|
|
struct actor_discarded_firing_position discarded_firing_positions[NUMBER_OF_DISCARDED_FIRING_POSITIONS_PER_ACTOR];
|
|
boolean last_discarded_firing_position_valid;
|
|
boolean last_discarded_firing_position_temporary;
|
|
real_point3d last_discarded_firing_position;
|
|
};
|
|
|
|
struct direction_specification
|
|
{
|
|
short type;
|
|
union
|
|
{
|
|
int prop_index;
|
|
int object_index;
|
|
real_point3d point;
|
|
real_vector3d vector;
|
|
};
|
|
};
|
|
|
|
struct actor_look_orders
|
|
{
|
|
short primary_priority;
|
|
struct direction_specification primary_direction;
|
|
short idle_look_type;
|
|
};
|
|
|
|
struct actor_destination_orders
|
|
{
|
|
short destination_type;
|
|
boolean keep_moving;
|
|
byte pad;
|
|
|
|
union
|
|
{
|
|
struct
|
|
{
|
|
real_point3d point;
|
|
long surface_index;
|
|
} raw;
|
|
|
|
short firing_position_index;
|
|
short move_position_index;
|
|
|
|
struct
|
|
{
|
|
int prop_index;
|
|
real accept_radius;
|
|
} prop;
|
|
};
|
|
|
|
long ignore_target_object_index;
|
|
};
|
|
|
|
struct actor_animation_orders
|
|
{
|
|
short impulse;
|
|
real_vector2d alignment_vector;
|
|
};
|
|
|
|
struct actor_move_orders
|
|
{
|
|
struct actor_destination_orders destination;
|
|
struct actor_animation_orders animation;
|
|
boolean dive_into_cover;
|
|
boolean emerge_from_cover;
|
|
boolean stationary_crouch;
|
|
boolean moving_crouch;
|
|
boolean panicked;
|
|
boolean flaming;
|
|
boolean move_face_exactly;
|
|
short override_movement_type;
|
|
short override_movement_facing;
|
|
boolean override_movement_direction;
|
|
real_vector3d override_movement_direction_vector;
|
|
boolean jump;
|
|
boolean jump_leap;
|
|
boolean jump_targeted;
|
|
real_vector2d jump_alignment_vector;
|
|
real jump_target_horizontal_vel;
|
|
real jump_target_vertical_vel;
|
|
};
|
|
|
|
struct actor_combat_orders
|
|
{
|
|
boolean shoot_at_target;
|
|
boolean bombard_target;
|
|
boolean abort_burst;
|
|
boolean override_firing_restrictions;
|
|
real override_burst_duration;
|
|
boolean throw_grenade;
|
|
boolean use_manual_target_point;
|
|
real_point3d target_point;
|
|
};
|
|
|
|
struct actor_orders
|
|
{
|
|
struct actor_look_orders look;
|
|
struct actor_move_orders move;
|
|
struct actor_combat_orders combat;
|
|
};
|
|
|
|
struct actor_path_control_data
|
|
{
|
|
struct actor_destination_orders destination_orders;
|
|
boolean at_destination;
|
|
struct path_destination destination;
|
|
real destination_distance;
|
|
real destination_original_distance;
|
|
boolean refreshed_this_tick;
|
|
struct path_result path;
|
|
};
|
|
|
|
struct actor_control_data
|
|
{
|
|
struct actor_path_control_data path;
|
|
boolean moving;
|
|
boolean moving_forced_by_aiming;
|
|
boolean movement_complete;
|
|
boolean movement_thwarted;
|
|
boolean crouching;
|
|
short moving_facing_direction;
|
|
real_point3d moving_towards_point;
|
|
real_vector3d moving_towards_vector;
|
|
real_vector3d moving_forced_aim_direction;
|
|
boolean jumping_targeted;
|
|
real_vector2d jump_alignment_vector;
|
|
real jump_target_horizontal_vel;
|
|
real jump_target_vertical_vel;
|
|
short secondary_look_type;
|
|
short secondary_look_priority;
|
|
short secondary_look_timer;
|
|
struct direction_specification secondary_look_direction;
|
|
boolean idle_major_active;
|
|
boolean idle_major_is_aiming;
|
|
boolean idle_major_direction_is_interesting;
|
|
boolean idle_minor_active;
|
|
long idle_facing_timer;
|
|
long idle_major_timer;
|
|
long idle_minor_timer;
|
|
struct direction_specification idle_major_direction;
|
|
struct direction_specification idle_minor_direction;
|
|
boolean aiming_away_from_primary;
|
|
boolean free_facing_vector;
|
|
boolean optional_facing_vector;
|
|
boolean desire_stationary_facing;
|
|
boolean fixed_stationary_facing;
|
|
boolean face_exactly;
|
|
real face_exactly_oversteer_angle;
|
|
real_vector3d fixed_stationary_facing_vector;
|
|
real_vector3d desired_facing_vector;
|
|
real_vector3d desired_aiming_vector;
|
|
real_vector3d desired_looking_vector;
|
|
boolean vector_avoidance_clear_times[8][2];
|
|
short vector_avoidance_current_direction;
|
|
real_vector3d vector_avoidance_rotation;
|
|
real vector_avoidance_rotation_emergency;
|
|
real vector_avoidance_rotation_emergency_instantaneous;
|
|
short vector_avoidance_sharp_turn_timer;
|
|
short fire_state;
|
|
short fire_state_timer;
|
|
short burst_disable_timer;
|
|
short trigger_delay_timer;
|
|
short blocked_communication_timer;
|
|
short special_fire_delay;
|
|
short special_fire_deny_attempts;
|
|
boolean firing_at_new_target;
|
|
boolean firing_while_moving;
|
|
boolean overcharging_weapon;
|
|
boolean fire_burst_secondary;
|
|
boolean next_burst_secondary;
|
|
real weapon_maximum_range;
|
|
short current_fire_target_type;
|
|
|
|
union
|
|
{
|
|
real_point3d current_fire_target_manual_point;
|
|
long current_fire_target_prop_index;
|
|
};
|
|
|
|
long current_fire_target_timer;
|
|
boolean current_fire_target_visible;
|
|
boolean current_fire_target_underwater;
|
|
boolean current_fire_target_superballistic;
|
|
boolean current_fire_target_bombardment;
|
|
boolean current_fire_target_outside_active_area;
|
|
short current_fire_target_line_of_sight;
|
|
boolean aiming_at_fire_target;
|
|
real_point3d current_fire_target_position;
|
|
real current_fire_target_range;
|
|
real_vector3d current_fire_target_aim_vector;
|
|
real current_fire_target_distance;
|
|
real_point3d burst_initial_position;
|
|
real_point3d burst_origin;
|
|
real_vector3d burst_relative_position;
|
|
real_vector3d burst_adjustment;
|
|
real_point3d burst_target;
|
|
boolean burst_aim_by_vector;
|
|
real_vector3d burst_aim_vector;
|
|
real burst_error;
|
|
real burst_damage_modifier;
|
|
boolean grenade_trying_to_throw;
|
|
boolean grenade_current_lob;
|
|
long grenade_last_check_time;
|
|
real_point3d grenade_current_target;
|
|
long grenade_current_prop_index;
|
|
long grenade_current_ignore_object_index;
|
|
real_vector3d grenade_current_aim_vector;
|
|
real grenade_current_aim_speed;
|
|
boolean idle_vocalization_combat;
|
|
short idle_vocalization_timer;
|
|
};
|
|
|
|
struct actor_output_data
|
|
{
|
|
unsigned long control_flags;
|
|
short persistent_control_ticks;
|
|
unsigned long persistent_control_flags;
|
|
short movement_type;
|
|
real_vector3d throttle;
|
|
struct actor_animation_orders animation;
|
|
short aiming_speed;
|
|
real_vector3d facing_vector;
|
|
real_vector3d aiming_vector;
|
|
real_vector3d looking_vector;
|
|
real analog_primary_trigger;
|
|
};
|
|
|
|
struct actor_datum
|
|
{
|
|
short identifier;
|
|
struct actor_meta_data meta;
|
|
struct actor_state_data state;
|
|
struct actor_input_data input;
|
|
struct actor_external_orders external_orders;
|
|
struct actor_situation situation;
|
|
struct actor_target_data target;
|
|
struct actor_danger_zone danger_zone;
|
|
struct actor_stimulus_data stimuli;
|
|
struct actor_emotion_data emotions;
|
|
struct actor_firing_position_data firing_positions;
|
|
struct actor_orders orders;
|
|
struct actor_control_data control;
|
|
struct actor_output_data output;
|
|
};
|
|
|
|
struct swarm_datum
|
|
{
|
|
short identifier;
|
|
short unit_count;
|
|
long actor_index;
|
|
short swarm_intermittent_action_timer;
|
|
real_point3d swarm_center;
|
|
long unit_indices[MAXIMUM_UNIT_INDICES_PER_SWARM];
|
|
long component_indices[MAXIMUM_COMPONENT_INDICES_PER_SWARM];
|
|
};
|
|
|
|
struct swarm_wander_control
|
|
{
|
|
byte pause_ticks;
|
|
byte move_ticks;
|
|
real_vector3d vector;
|
|
real angle;
|
|
};
|
|
|
|
struct swarm_component_datum
|
|
{
|
|
short identifier;
|
|
short flags;
|
|
real_point3d position;
|
|
long surface_index;
|
|
long combat_target_prop_index;
|
|
byte attached_to_unit_ticks;
|
|
byte ground_ticks;
|
|
byte attack_delay_ticks;
|
|
byte pad;
|
|
union
|
|
{
|
|
struct swarm_wander_control wander;
|
|
struct obey_individual_simple_control obey;
|
|
};
|
|
};
|
|
|
|
struct vehicle_avoidance_cylinder
|
|
{
|
|
long object_index;
|
|
real_point3d base;
|
|
real height;
|
|
real width;
|
|
};
|
|
|
|
struct vector_avoidance_data
|
|
{
|
|
const struct structure_bsp *structure;
|
|
const struct collision_bsp *bsp;
|
|
int object_index;
|
|
real_point3d origin;
|
|
real_vector3d forward;
|
|
real_vector3d left;
|
|
real_vector3d up;
|
|
short avoidance_object_count;
|
|
struct vehicle_avoidance_cylinder avoidance_objects[MAXIMUM_NUMBER_OF_AVOIDANCE_OBJECTS];
|
|
real avoid_width;
|
|
real avoid_distance;
|
|
};
|
|
|
|
/* ---------- prototypes/ACTORS.C */
|
|
|
|
void actors_initialize(
|
|
void);
|
|
void actors_dispose(
|
|
void);
|
|
void actors_initialize_for_new_map(
|
|
void);
|
|
void actors_dispose_from_old_map(
|
|
void);
|
|
real_argb_color const *actor_activation_debug_color(
|
|
long actor_index);
|
|
void actor_verify_activation(
|
|
long actor_index);
|
|
void actor_set_team(
|
|
long actor_index,
|
|
short team_index);
|
|
void actor_detach_from_unit(
|
|
long actor_index);
|
|
void actor_swarm_detach_from_unit(
|
|
long actor_index,
|
|
long unit_index);
|
|
void actor_swarm_cache_delete(
|
|
long actor_index);
|
|
long actor_new(
|
|
long actor_variant_definition_index);
|
|
void actor_customize_unit(
|
|
long actor_variant_definition_index,
|
|
long unit_index);
|
|
long actor_create_for_unit(
|
|
boolean swarm,
|
|
long unit_index,
|
|
long actor_variant_definition_index,
|
|
long encounter_index,
|
|
short squad_index,
|
|
boolean allow_addition_to_other_squads,
|
|
long disallow_actor_index,
|
|
boolean initially_braindead,
|
|
short initial_state,
|
|
short default_state,
|
|
short initial_command_list_index,
|
|
short noncombat_sequence_id);
|
|
|
|
short actors_spawn_from_unit(
|
|
long unit_index,
|
|
long actor_variant_definition_index,
|
|
short actor_count,
|
|
real throw_velocity);
|
|
void actor_set_dormant(
|
|
long actor_index,
|
|
boolean dormant);
|
|
void actor_find_pathfinding_location(
|
|
long actor_index);
|
|
real actor_destination_tolerance(
|
|
long actor_index);
|
|
void actor_input_sample_position(
|
|
long actor_index,
|
|
long unit_index,
|
|
struct actor_position_data *position);
|
|
boolean actor_get_running_blind_vector(
|
|
long actor_index,
|
|
real_vector3d *run_vector);
|
|
boolean actor_has_unlimited_grenades(
|
|
long actor_index);
|
|
boolean actor_is_noncombat(
|
|
long actor_index);
|
|
boolean actor_in_combat(
|
|
long actor_index);
|
|
boolean actor_is_fighting(
|
|
long actor_index);
|
|
boolean actor_attacking_target(
|
|
long actor_index,
|
|
real_vector3d *attack_vector);
|
|
boolean actor_is_leaping(
|
|
long actor_index);
|
|
long actor_get_weapon(
|
|
long actor_index);
|
|
boolean actor_has_ranged_weapon(
|
|
long actor_index);
|
|
boolean actor_type_flood_desire_shamble(
|
|
long actor_index);
|
|
long actor_target_unit_index(
|
|
long actor_index);
|
|
void actor_derive_target_information(
|
|
long actor_index,
|
|
long target_actor_index);
|
|
void actor_switch_props(
|
|
long actor_index,
|
|
long old_prop_index,
|
|
long new_prop_index);
|
|
void actor_flush_position_indices(
|
|
long actor_index);
|
|
void actor_flush_structure_indices(
|
|
long actor_index);
|
|
void actor_handle_damage(
|
|
long actor_index,
|
|
long aggressor_unit_index,
|
|
real damage_fraction,
|
|
real_vector3d *damage_velocity);
|
|
void actor_change_encounter(
|
|
long actor_index,
|
|
long encounter_index,
|
|
short squad_index);
|
|
void actors_handle_spatial_effect(
|
|
long object_index,
|
|
short effect_type,
|
|
real_point3d const *position,
|
|
short volume,
|
|
short count);
|
|
void actor_unit_control_crouch(
|
|
long actor_index,
|
|
boolean crouch);
|
|
void actor_unit_control_jump(
|
|
long actor_index);
|
|
void actor_unit_control_primary_trigger(
|
|
long actor_index,
|
|
boolean firing,
|
|
real analog_primary_trigger);
|
|
void actor_unit_control_secondary_trigger(
|
|
long actor_index,
|
|
boolean firing);
|
|
void actor_unit_control_throw_grenade(
|
|
long actor_index);
|
|
void actor_unit_control_exact_facing(
|
|
long actor_index,
|
|
boolean exact_facing);
|
|
void actor_unit_control_stop_animation_impulse(
|
|
long actor_index);
|
|
void actor_died(
|
|
long actor_index);
|
|
void actor_delete_props(
|
|
long actor_index);
|
|
void actor_delete(
|
|
long actor_index,
|
|
boolean died);
|
|
long actor_swarm_cache_new(
|
|
long actor_index);
|
|
void actor_kill(
|
|
long actor_index,
|
|
boolean silent,
|
|
boolean delayed);
|
|
void actor_swarm_unit_died(
|
|
long actor_index,
|
|
long unit_index);
|
|
void actor_braindead(
|
|
long actor_index,
|
|
boolean braindead);
|
|
void actor_handle_unit_effect(
|
|
long actor_index,
|
|
long prop_index,
|
|
short effect_type);
|
|
boolean actor_swarm_attach_unit(
|
|
long actor_index,
|
|
long unit_index);
|
|
void actors_freeze(
|
|
void);
|
|
void actors_move_randomly(
|
|
void);
|
|
void actor_attach_unit(
|
|
long actor_index,
|
|
long unit_index);
|
|
void actor_erase(
|
|
long actor_index,
|
|
boolean immediate);
|
|
void actors_handle_unit_effect(
|
|
long unit_index,
|
|
short effect_type,
|
|
short volume);
|
|
void actors_update(
|
|
void);
|
|
|
|
/* ---------- prototypes/ACTOR_FIRING_POSITION.C */
|
|
|
|
long actor_get_firing_position_group(
|
|
long actor_index,
|
|
short evaluation_mode,
|
|
short group_selection_mode);
|
|
void actor_clear_discarded_firing_positions(
|
|
long actor_index,
|
|
boolean clear_temporary_only);
|
|
void actor_discard_firing_position(
|
|
long actor_index,
|
|
short firing_position_index,
|
|
boolean temporary);
|
|
boolean actor_firing_position_discarded(
|
|
long actor_index,
|
|
short firing_position_index);
|
|
boolean actor_nearby_firing_positions(
|
|
long actor_index,
|
|
real_point3d const *test_point,
|
|
long test_surface_index,
|
|
short group_selection_mode);
|
|
short actor_select_firing_position(
|
|
long actor_index,
|
|
struct firing_position_evaluation_context *evaluation_context,
|
|
struct firing_position *best_firing_position,
|
|
long *current_owner,
|
|
struct path_state *area_path_state,
|
|
boolean *area_path_state_valid);
|
|
short actor_active_select_firing_position(
|
|
long actor_index,
|
|
struct firing_position_evaluation_context *evaluation_context,
|
|
struct firing_position *best_firing_position,
|
|
long *current_owner,
|
|
struct path_state *area_path_state,
|
|
boolean *area_path_state_valid);
|
|
short actor_change_firing_position(
|
|
long actor_index,
|
|
short firing_position_index,
|
|
struct firing_position *firing_position,
|
|
long previous_owner,
|
|
struct path_state *cached_path_state,
|
|
boolean cached_path_available);
|
|
|
|
/* ---------- prototypes/ACTOR_COMBAT.C */
|
|
|
|
struct weapon_definition;
|
|
|
|
boolean actor_combat_currently_firing_burst(
|
|
long actor_index);
|
|
void actor_combat_fire_wildly(
|
|
long actor_index,
|
|
short fire_ticks);
|
|
void actor_combat_disable_bursts(
|
|
long actor_index,
|
|
long disable_timer);
|
|
boolean actor_firing_blindly(
|
|
long actor_index);
|
|
struct weapon_definition *actor_get_weapon_definition(
|
|
long actor_index);
|
|
struct actor_variant_definition *actor_combat_get_firing_variant_definition(
|
|
long actor_index);
|
|
boolean actor_combat_find_grenade_target(
|
|
long actor_index,
|
|
real_point3d *grenade_target,
|
|
long *grenade_target_prop_index,
|
|
long *grenade_ignore_object_index);
|
|
boolean actor_combat_check_collateral_damage(
|
|
long actor_index,
|
|
real enemy_radius,
|
|
real collateral_damage_radius,
|
|
real_point3d const *test_point,
|
|
short *threat_count);
|
|
boolean actor_combat_plan_grenade_trajectory(
|
|
long actor_index,
|
|
short trajectory_type,
|
|
real_point3d const *grenade_target,
|
|
long grenade_target_prop_index,
|
|
long grenade_ignore_object_index);
|
|
long actor_aim_grenade(
|
|
long actor_index,
|
|
real_point3d const *origin,
|
|
real_vector3d *vector);
|
|
long actor_aim_projectile(
|
|
long actor_index,
|
|
real_point3d const *origin,
|
|
real_vector3d *vector,
|
|
real *error_reference);
|
|
void actor_combat_update(
|
|
long actor_index);
|
|
|
|
/* ---------- prototypes/ACTOR_MOVING.C */
|
|
|
|
void actor_move_initialize(
|
|
void);
|
|
boolean actor_move_force_stop(
|
|
long actor_index);
|
|
boolean actor_move_animation_busy(
|
|
long actor_index);
|
|
boolean actor_move_animation_impulse(
|
|
long actor_index,
|
|
short impulse,
|
|
real_vector2d const *alignment_vector);
|
|
boolean actor_aim_jump(
|
|
long actor_index,
|
|
long unit_index,
|
|
boolean leap,
|
|
real jump_magnitude,
|
|
real_vector3d *jump_velocity);
|
|
void actor_path_input_new(
|
|
long actor_index,
|
|
struct path_input *input);
|
|
boolean actor_path_3d_available(
|
|
long actor_index,
|
|
real_point3d const *destination,
|
|
real *avoidance_distance_reference);
|
|
boolean actor_test_destination(
|
|
long actor_index);
|
|
boolean actor_path_refresh(
|
|
long actor_index,
|
|
boolean new_destination,
|
|
struct path_state *cached_path_state);
|
|
boolean actor_move_to_point(
|
|
long actor_index,
|
|
real_point3d const *destination,
|
|
long surface_index,
|
|
long ignore_target_object_index);
|
|
void actor_move_keep_moving_past_destination(
|
|
long actor_index);
|
|
boolean actor_move_to_move_position(
|
|
long actor_index,
|
|
short move_position_index);
|
|
boolean actor_move_to_firing_position(
|
|
long actor_index,
|
|
short firing_position_index,
|
|
struct path_state *cached_path_state);
|
|
boolean actor_move_to_prop(
|
|
long actor_index,
|
|
long prop_index,
|
|
real distance);
|
|
boolean actor_move_halt(
|
|
long actor_index);
|
|
boolean actor_move_halt_at_firing_position(
|
|
long actor_index);
|
|
|
|
boolean actor_look_secondary(
|
|
long actor_index,
|
|
short type,
|
|
short priority,
|
|
struct direction_specification const *direction);
|
|
|
|
void actor_move_transform_avoidance_vector(
|
|
struct vector_avoidance_data *avoidance_data,
|
|
real_vector3d const *avoidance_vector,
|
|
real_vector3d *direction_vector);
|
|
void actor_move_get_avoidance_direction(
|
|
struct vector_avoidance_data *avoidance_data,
|
|
real direction,
|
|
real_vector3d *direction_vector);
|
|
|
|
boolean actor_path_has_path(
|
|
long actor_index);
|
|
boolean actor_path_at_destination(
|
|
long actor_index);
|
|
void actor_destination_update(
|
|
long actor_index);
|
|
void actor_move_update(
|
|
long actor_index);
|
|
|
|
/* ---------- prototypes/ACTOR_PERCEPTION.C */
|
|
|
|
boolean actor_compute_prop_unopposable(
|
|
long actor_index,
|
|
long prop_index);
|
|
real actor_compute_prop_target_weight(
|
|
long actor_index,
|
|
long prop_index);
|
|
short actor_visibility_at_point(
|
|
long actor_index,
|
|
struct actor_position_data const *position,
|
|
union real_point3d const *target_position,
|
|
char lighting,
|
|
short line_of_sight,
|
|
boolean use_maximum_distance,
|
|
boolean target_is_player,
|
|
short perception_knowledge);
|
|
boolean actor_perception_desire_prop(
|
|
long actor_index,
|
|
short desired_target_state,
|
|
long unit_index,
|
|
long prop_actor_index,
|
|
boolean in_use,
|
|
boolean player,
|
|
boolean enemy,
|
|
boolean dead,
|
|
short dead_ticks,
|
|
real suicide_radius,
|
|
real distance_squared,
|
|
short required_ticks,
|
|
boolean *too_far_reference);
|
|
boolean actor_expected_acknowledgement(
|
|
long actor_index,
|
|
long prop_index);
|
|
void actor_perception_acknowledge(
|
|
long actor_index,
|
|
long prop_index,
|
|
boolean had_orphan,
|
|
boolean expected_acknowledgement);
|
|
short actor_get_perception_knowledge(
|
|
long actor_index,
|
|
long prop_index);
|
|
boolean actor_perception_become_acknowledged(
|
|
long actor_index,
|
|
long prop_index,
|
|
boolean *expected_acknowledgement_out);
|
|
void prop_status_refresh(
|
|
long actor_index,
|
|
long prop_index,
|
|
struct actor_position_data *position);
|
|
boolean actor_perception_create_orphan_from_friend(
|
|
long actor_index,
|
|
long unit_index,
|
|
long friend_actor_index,
|
|
long friend_prop_index);
|
|
long actor_perception_find_killer_prop_index(
|
|
long actor_index,
|
|
long prop_index,
|
|
boolean enemies_only);
|
|
long actor_perception_find_recent_damaging_prop_index(
|
|
long actor_index,
|
|
boolean enemies_only);
|
|
void actor_perception_forget_recent_damage(
|
|
long actor_index);
|
|
void actor_perception_retreat_successful(
|
|
long actor_index);
|
|
void actor_perception_find_prop_pathfinding_location(
|
|
long actor_index,
|
|
long prop_index);
|
|
void actor_perception_tried_to_uncover(
|
|
long actor_index,
|
|
long prop_index);
|
|
void actor_perception_tried_to_search(
|
|
long actor_index,
|
|
long prop_index);
|
|
void actor_perception_abandoned_search(
|
|
long actor_index,
|
|
long prop_index);
|
|
void actor_perception_find_sense_position(
|
|
long actor_index,
|
|
real_point3d const *position,
|
|
long prop_index,
|
|
struct actor_position_data *sense_position);
|
|
void prop_position_refresh(
|
|
long actor_index,
|
|
long prop_index,
|
|
struct actor_position_data *position,
|
|
boolean refresh_position,
|
|
boolean refresh_vehicle);
|
|
short actor_audibility_at_point(
|
|
long actor_index,
|
|
struct actor_position_data const *sense_position,
|
|
real_point3d const *position,
|
|
struct location const *location,
|
|
short volume,
|
|
real perception_factor,
|
|
short line_of_sight);
|
|
void actor_perception_update(
|
|
long actor_index);
|
|
void actor_situation_update(
|
|
long actor_index);
|
|
boolean actor_perception_friend_prop_is_attacking(
|
|
long actor_index,
|
|
long friend_prop_index,
|
|
real_vector3d *attack_vector);
|
|
void actor_emotion_update(
|
|
long actor_index);
|
|
void actor_perception_unreachable(
|
|
long actor_index,
|
|
long prop_index,
|
|
boolean unreachable);
|
|
boolean actor_emotion_flee_with_friends(
|
|
long actor_index,
|
|
real *desire_to_flee);
|
|
boolean actor_situation_try_new_target(
|
|
long actor_index,
|
|
long prop_index);
|
|
|
|
/* ---------- prototypes/ACTOR_STIMULUS.C */
|
|
|
|
void actor_stimulus_vehicle_eviction(
|
|
long actor_index);
|
|
void actor_stimulus_surprise(
|
|
long actor_index,
|
|
short surprise_level,
|
|
long prop_index,
|
|
real_vector3d const *surprise_vector);
|
|
void actor_stimulus_suspicion(
|
|
long actor_index,
|
|
short suspicion_combat_status,
|
|
long suspicion_timer);
|
|
void actor_stimulus_enter_combat_found_body(
|
|
long actor_index,
|
|
long prop_index);
|
|
void actor_stimulus_enter_combat_perceived_enemy(
|
|
long actor_index,
|
|
long prop_index);
|
|
void actor_stimulus_enter_combat_friend_in_combat(
|
|
long actor_index,
|
|
long prop_index);
|
|
void actor_stimulus_clear(
|
|
long actor_index);
|
|
void actor_stimulus_bumped(
|
|
long actor_index,
|
|
long prop_index);
|
|
void actor_stimulus_environmental_noise(
|
|
long actor_index,
|
|
long object_index,
|
|
real_point3d const *position,
|
|
short count);
|
|
void actor_stimulus_heard_shooting(
|
|
long actor_index,
|
|
long prop_index);
|
|
void actor_stimulus_prop_sighted(
|
|
long actor_index,
|
|
long prop_index,
|
|
boolean initial_acknowledgement);
|
|
void actor_stimulus_noticed_danger_zone(
|
|
long actor_index,
|
|
short danger_type,
|
|
short danger_hostility,
|
|
long danger_object_index,
|
|
real_point3d const *position);
|
|
void actor_stimulus_weapon_impact(
|
|
long actor_index,
|
|
long object_index,
|
|
real_point3d const *position,
|
|
short count);
|
|
void actor_stimulus_weapon_detonation(
|
|
long actor_index,
|
|
long object_index,
|
|
real_point3d const *position,
|
|
short count);
|
|
void actor_stimulus_damage(
|
|
long actor_index,
|
|
long prop_index,
|
|
real damage_fraction,
|
|
real_vector3d const *damage_velocity);
|
|
void actor_stimulus_prop_just_killed(
|
|
long actor_index,
|
|
long prop_index);
|
|
void actor_stimulus_prop_fleeing(
|
|
long actor_index,
|
|
long prop_index);
|
|
void actor_stimulus_maneuvering(
|
|
long actor_index,
|
|
boolean advancing,
|
|
boolean flee);
|
|
void actor_stimulus_abandon_stationary_facing(
|
|
long actor_index);
|
|
void actor_stimulus_prop_acknowledged(
|
|
long actor_index,
|
|
long prop_index,
|
|
boolean reappearance,
|
|
boolean expected_acknowledgement);
|
|
void actor_stimulus_was_surprised(
|
|
long actor_index);
|
|
|
|
// prototypes/ACTOR_LOOKING.C
|
|
void actor_look_secondary_stop(
|
|
long actor_index);
|
|
real actor_look_compute_prop_interest(
|
|
long actor_index,
|
|
long prop_index);
|
|
void actor_looking_test_validity(
|
|
long actor_index,
|
|
real_vector3d const *vector,
|
|
boolean *aiming_valid,
|
|
boolean *looking_valid);
|
|
void actor_look_update(
|
|
long actor_index);
|
|
void actor_look_affect_movement(
|
|
long actor_index);
|
|
|
|
void actor_get_vision_distances(
|
|
long actor_index,
|
|
real maximum_vision_distance,
|
|
real perception_factor,
|
|
real horizontal_angle,
|
|
real *full_distance_reference,
|
|
real *partial_distance_reference);
|
|
void actor_situation_update_target_status(
|
|
long actor_index);
|
|
void actor_situation_combat_status_update(
|
|
long actor_index);
|
|
|
|
void actor_berserk(
|
|
long actor_index,
|
|
boolean berserk);
|
|
|
|
short actor_perception_aiming_vector_test_blockage(
|
|
real_point3d const *source_position,
|
|
real_vector3d const *source_vector,
|
|
real_point3d const *friend_position,
|
|
real_vector3d *friend_direction_to_aiming_vector);
|
|
|
|
/* ---------- globals */
|
|
|
|
extern struct data_array *swarm_data;
|
|
extern struct data_array *swarm_component_data;
|
|
extern struct data_array *actor_data;
|
|
|
|
/* ---------- public code */
|
|
|
|
#endif // __ACTORS_H
|