11typedef struct Pilot_
Pilot;
13#define MIN_DIR_ERR 5.0*M_PI/180.
14#define MAX_DIR_ERR 0.5*M_PI/180.
15#define MIN_VEL_ERR 5.0
18#define MAX_AI_TIMERS 2
41typedef struct AI_Profile_ {
Task * ai_newtask(lua_State *L, Pilot *p, const char *func, int subtask, int pos)
Creates a new AI task.
void ai_getDistress(Pilot *p, const Pilot *distressed, const Pilot *attacker)
Sends a distress signal to a pilot.
Task * ai_curTask(Pilot *pilot)
Gets the current running task.
void ai_refuel(Pilot *refueler, unsigned int target)
Has a pilot attempt to refuel the other.
void ai_cleartasks(Pilot *p)
Clears the pilot's tasks.
void ai_freetask(Task *t)
Frees an AI task.
void ai_attacked(Pilot *attacked, const unsigned int attacker, double dmg)
Triggers the attacked() function in the pilot's AI.
void ai_destroy(Pilot *p)
Destroys the ai part of the pilot.
void ai_hail(Pilot *recipient)
Triggers the hail() function in the pilot's AI.
void ai_discovered(Pilot *discovered)
Triggers the discovered() function in the pilot's AI.
void ai_exit(void)
Cleans up global AI.
void ai_setPilot(Pilot *p)
Sets the pilot for further AI calls.
void ai_think(Pilot *pilot, const double dt)
Heart of the AI, brains of the pilot.
void ai_init(Pilot *p)
Initializes the AI.
int ai_pinit(Pilot *p, const char *ai)
Initializes the pilot in the ai.
int ai_load(void)
Initializes the AI stuff which is basically Lua.
AI_Profile * ai_getProfile(const char *name)
Gets the AI_Profile by name.
The representation of an in-game pilot.