|
| static void | pilot_init (Pilot *pilot, const Ship *ship, const char *name, int faction, double dir, const vec2 *pos, const vec2 *vel, const PilotFlags flags, unsigned int dockpilot, int dockslot) |
| | Initialize pilot.
|
| static void | pilot_hyperspace (Pilot *p, double dt) |
| | Handles pilot's hyperspace states.
|
| static void | pilot_refuel (Pilot *p, double dt) |
| | Has the pilot refuel its target.
|
| static void | pilot_updateSolid (Pilot *p, double dt) |
| | Updates the pilot solid.
|
| static void | pilot_erase (Pilot *p) |
| | Destroys pilot from stack.
|
| static void | pilot_renderFramebufferBase (Pilot *p, GLuint fbo, double fw, double fh, const Lighting *L) |
| | Renders a pilot to a framebuffer without effects.
|
| static int | pilot_getStackPos (unsigned int id) |
| | Gets the pilot's position in the stack.
|
| static void | pilot_init_trails (Pilot *p) |
| | Initialize pilot's trails according to the ship type and current system characteristics.
|
| static int | pilot_trail_generated (Pilot *p, int generator) |
| | Return true if the given trail_emitters index has a corresponding generated trail.
|
| static void | pilot_addQuadtree (const Pilot *p, int i) |
| Pilot *const * | pilot_getAll (void) |
| | Gets the pilot stack.
|
| static int | pilot_cmp (const void *ptr1, const void *ptr2) |
| | Compare id (for use with bsearch)
|
| unsigned int | pilot_getNextID (unsigned int id, int mode) |
| | Gets the next pilot based on id.
|
| unsigned int | pilot_getPrevID (unsigned int id, int mode) |
| | Gets the previous pilot based on ID.
|
| int | pilot_validTarget (const Pilot *p, const Pilot *target) |
| | Checks to see if a pilot is a valid target for another pilot.
|
| int | pilot_validTargetRange (const Pilot *p, const Pilot *target, int *inrange) |
| | Checks to see if a pilot is a valid target for another pilot while storing the result of pilot_inRangePilot in inrange.
|
| int | pilot_canTarget (const Pilot *p) |
| | Same as pilot_validTarget but without the range check.
|
| int | pilot_validEnemy (const Pilot *p, const Pilot *target) |
| | Checks to see if a pilot is a valid enemy for another pilot.
|
| unsigned int | pilot_getNearestEnemy (const Pilot *p) |
| | Gets the nearest enemy to the pilot.
|
| unsigned int | pilot_getNearestEnemy_size (const Pilot *p, double target_mass_LB, double target_mass_UB) |
| | Gets the nearest enemy to the pilot closest to the pilot whose mass is between LB and UB.
|
| unsigned int | pilot_getNearestEnemy_heuristic (const Pilot *p, double mass_factor, double health_factor, double damage_factor, double range_factor) |
| | Gets the nearest enemy to the pilot closest to the pilot whose mass is between LB and UB.
|
| unsigned int | pilot_getNearestPilot (const Pilot *p) |
| | Get the nearest pilot to a pilot.
|
| unsigned int | pilot_getBoss (const Pilot *p) |
| | Get the strongest ally in a given range.
|
| double | pilot_getNearestPosPilot (const Pilot *p, Pilot **tp, double x, double y, int disabled) |
| | Get the nearest pilot to a pilot from a certain position.
|
| double | pilot_getNearestPos (const Pilot *p, unsigned int *tp, double x, double y, int disabled) |
| | Get the nearest pilot to a pilot from a certain position.
|
| double | pilot_getNearestAng (const Pilot *p, unsigned int *tp, double ang, int disabled) |
| | Get the pilot closest to an angle extending from another pilot.
|
| Pilot * | pilot_get (unsigned int id) |
| | Pulls a pilot out of the pilot_stack based on ID.
|
| Pilot * | pilot_getTarget (Pilot *p) |
| | Gets the target of a pilot using a fancy caching system.
|
| void | pilot_setAccel (Pilot *p, double accel) |
| | Sets the pilot's accel.
|
| void | pilot_setTurn (Pilot *p, double turn) |
| | Sets the pilot's turn.
|
| int | pilot_isHostile (const Pilot *p) |
| | Checks to see if pilot is hostile to the player.
|
| int | pilot_isNeutral (const Pilot *p) |
| | Checks to see if pilot is neutral to the player.
|
| int | pilot_isFriendly (const Pilot *p) |
| | Checks to see if pilot is friendly to the player.
|
| int | pilot_areAllies (const Pilot *p, const Pilot *target) |
| | Like areAllies but for pilots.
|
| int | pilot_areEnemies (const Pilot *p, const Pilot *target) |
| | Like areEnemies but for pilots.
|
| PilotOutfitSlot * | pilot_getDockSlot (Pilot *p) |
| | Gets the dock slot of the pilot.
|
| const IntList * | pilot_collideQuery (int x1, int y1, int x2, int y2) |
| void | pilot_collideQueryIL (IntList *il, int x1, int y1, int x2, int y2) |
| double | pilot_face (Pilot *p, double dir, double dt) |
| | Tries to turn the pilot to face dir.
|
| int | pilot_brakeCheckReverseThrusters (const Pilot *p) |
| | See if the pilot wants to use their reverse thrusters to brake.
|
| double | pilot_minbrakedist (const Pilot *p, double dt, double *flytime) |
| | Gets the minimum braking distance for the pilot.
|
| int | pilot_brake (Pilot *p, double dt) |
| | Causes the pilot to turn around and brake.
|
| void | pilot_cooldown (Pilot *p, int dochecks) |
| | Begins active cooldown, reducing hull and outfit temperatures.
|
| void | pilot_cooldownEnd (Pilot *p, const char *reason) |
| | Terminates active cooldown.
|
| double | pilot_aimAngle (Pilot *p, const vec2 *pos, const vec2 *vel) |
| | Returns the angle for a pilot to aim at another pilot.
|
| void | pilot_setHostile (Pilot *p) |
| | Marks pilot as hostile to player.
|
| char | pilot_getFactionColourChar (const Pilot *p) |
| | Gets the faction colour char, works like faction_reputationColourChar but for a pilot.
|
| void | pilot_setCommMsg (Pilot *p, const char *s) |
| | Sets the overhead communication message of the pilot.
|
| void | pilot_broadcast (Pilot *p, const char *msg, int ignore_int) |
| | Has the pilot broadcast a message.
|
| void | pilot_distress (Pilot *p, Pilot *attacker, const char *msg) |
| | Has the pilot broadcast a distress signal.
|
| void | pilot_rmHostile (Pilot *p) |
| | Unmarks a pilot as hostile to player.
|
| void | pilot_setFriendly (Pilot *p) |
| | Marks pilot as friendly to player.
|
| void | pilot_rmFriendly (Pilot *p) |
| | Unmarks a pilot as friendly to player.
|
| int | pilot_getJumps (const Pilot *p) |
| | Gets the amount of jumps the pilot has left.
|
| const glColour * | pilot_getColour (const Pilot *p) |
| | Gets a pilot's colour.
|
| void | pilot_setTarget (Pilot *p, unsigned int id) |
| | Sets the target of the pilot.
|
| double | pilot_hit (Pilot *p, const Solid *w, const Pilot *pshooter, const Damage *dmg, const Outfit *outfit, int lua_mem, int reset) |
| | Damages the pilot.
|
| void | pilot_updateDisable (Pilot *p, unsigned int shooter) |
| | Handles pilot disabling. Set or unset the disable status depending on health and stress values.
|
| void | pilot_dead (Pilot *p, unsigned int killer) |
| | Pilot is dead, now will slowly explode.
|
| void | pilot_explode (double x, double y, double radius, const Damage *dmg, const Pilot *parent) |
| | Makes the pilot explosion.
|
| void | pilot_renderFramebuffer (Pilot *p, GLuint fbo, double fw, double fh, const Lighting *L) |
| | Renders a pilot to a framebuffer.
|
| void | pilot_render (Pilot *p) |
| | Renders the pilot.
|
| void | pilot_renderOverlay (Pilot *p) |
| | Renders the pilot overlay.
|
| void | pilot_update (Pilot *pilot, double dt) |
| | Updates the pilot.
|
| void | pilot_sample_trails (Pilot *p, int none) |
| | Updates the given pilot's trail emissions.
|
| void | pilot_delete (Pilot *p) |
| | Deletes a pilot.
|
| void | pilot_hyperspaceAbort (Pilot *p) |
| | Stops the pilot from hyperspacing.
|
| int | pilot_refuelStart (Pilot *p) |
| | Attempts to start refueling the pilot's target.
|
| ntime_t | pilot_hyperspaceDelay (const Pilot *p) |
| | Calculates the hyperspace delay for a pilot.
|
| void | pilot_untargetAsteroid (int anchor, int asteroid) |
| | Loops over pilot stack to remove an asteroid as target.
|
| int | pilot_numOutfit (const Pilot *p, const Outfit *o) |
| | Checks to see how many of an outfit a pilot has.
|
| int | pilot_hasCredits (const Pilot *p, credits_t amount) |
| | Checks to see if the pilot has at least a certain amount of credits.
|
| credits_t | pilot_modCredits (Pilot *p, credits_t amount) |
| | Modifies the amount of credits the pilot has.
|
| void | pilot_reset (Pilot *pilot) |
| | Resets a pilot.
|
| Pilot * | pilot_create (const Ship *ship, const char *name, int faction, const char *ai, const double dir, const vec2 *pos, const vec2 *vel, const PilotFlags flags, unsigned int dockpilot, int dockslot) |
| | Creates a new pilot.
|
| Pilot * | pilot_createEmpty (const Ship *ship, const char *name, int faction, PilotFlags flags) |
| | Creates a pilot without adding it to the stack.
|
| unsigned int | pilot_clone (const Pilot *ref) |
| | Clones an existing pilot.
|
| unsigned int | pilot_addStack (Pilot *p) |
| | Adds a pilot to the stack.
|
| void | pilot_clearTrails (Pilot *p) |
| | Resets the trails for a pilot.
|
| Pilot * | pilot_setPlayer (Pilot *after) |
| | Replaces the player's pilot with an alternate ship with the same ID.
|
| void | pilot_choosePoint (vec2 *vp, Spob **spob, JumpPoint **jump, int lf, int ignore_rules, int guerilla) |
| | Finds a spawn point for a pilot.
|
| void | pilot_free (Pilot *p) |
| | Frees and cleans up a pilot.
|
| void | pilot_stackRemove (Pilot *p) |
| | Tries to remove a pilot from the stack.
|
| void | pilots_init (void) |
| | Initializes pilot stuff.
|
| void | pilots_free (void) |
| | Frees the pilot stack.
|
| void | pilots_clean (int persist) |
| | Cleans up the pilot stack - leaves the player.
|
| void | pilots_newSystem (void) |
| | Updates pilot state which depends on the system (sensor range, nebula trails...)
|
| void | pilots_clear (void) |
| | Clears all the pilots except the player and clear-exempt pilots.
|
| void | pilots_cleanAll (void) |
| | Even cleans up the player.
|
| void | pilots_updatePurge (void) |
| | Purges pilots set for deletion.
|
| void | pilots_update (double dt) |
| | Updates all the pilots.
|
| void | pilots_render (void) |
| | Renders all the pilots.
|
| void | pilots_renderOverlay (void) |
| | Renders all the pilots overlays.
|
| void | pilot_clearTimers (Pilot *pilot) |
| | Clears the pilot's timers.
|
| double | pilot_relsize (const Pilot *cur_pilot, const Pilot *p) |
| | Gets the relative size(shipmass) between the current pilot and the specified target.
|
| void | pilot_dpseps (const Pilot *p, double *pdps, double *peps) |
| | Calculates the dps and eps of a pilot.
|
| double | pilot_reldps (const Pilot *cur_pilot, const Pilot *p) |
| | Gets the relative damage output(total DPS) between the current pilot and the specified target.
|
| double | pilot_relhp (const Pilot *cur_pilot, const Pilot *p) |
| | Gets the relative hp(combined shields and armour) between the current pilot and the specified target.
|
| credits_t | pilot_worth (const Pilot *p, int count_unique) |
| | Gets the price or worth of a pilot in credits.
|
| mat4 | pilot_local_transform (const Pilot *p) |
| | Gets the local transformation matrix of a pilot.
|
| void | pilot_msg (const Pilot *p, const Pilot *receiver, const char *type, unsigned int idx) |
| | Sends a message.
|
| int | pilot_hasIllegal (const Pilot *p, int faction) |
| | Checks to see if the pilot has illegal stuf to a faction.
|
| void | pilot_quadtreeParams (int max_elem, int depth) |
| | Sets the quad tree parameters. Can have significant impact on performance.
|