![]() |
naev 0.12.5
|
Pilot electronic warfare information. More...
#include "array.h"#include "hook.h"#include "pilot.h"#include "player.h"#include "player_autonav.h"#include "space.h"
Go to the source code of this file.
Functions | |
| static void | pilot_ewUpdate (Pilot *p) |
| Updates all the internal values. | |
| static double | pilot_ewMass (double mass) |
| Gets the electronic warfare mass modifier for a given mass. | |
| static double | pilot_ewAsteroid (const Pilot *p) |
| Gets the electronic warfare asteroid modifier. | |
| static double | pilot_ewJumpPoint (const Pilot *p) |
| Gets the electronic warfare jump point modifier. | |
| static int | pilot_ewStealthGetNearby (const Pilot *p, double *mod, int *close, int *isplayer) |
| Checks to see if there are pilots nearby to a stealthed pilot that could break stealth. | |
| double | pilot_ewScanTime (const Pilot *p) |
| Gets the time it takes to scan a pilot. | |
| void | pilot_ewScanStart (Pilot *p) |
| Initializes the scan timer for a pilot. | |
| int | pilot_ewScanCheck (const Pilot *p) |
| Checks to see if a scan is done. | |
| void | pilot_ewUpdateStatic (Pilot *p) |
| Updates the pilot's static electronic warfare properties. | |
| void | pilot_ewUpdateDynamic (Pilot *p, double dt) |
| Updates the pilot's dynamic electronic warfare properties. | |
| void | pilot_updateSensorRange (void) |
| Updates the system's base sensor range. | |
| double | pilot_sensorRange (void) |
| Returns the default sensor range for the current system. | |
| int | pilot_inRange (const Pilot *p, double x, double y) |
| Check to see if a position is in range of the pilot. | |
| int | pilot_inRangePilot (const Pilot *p, const Pilot *target, double *dist2) |
| Check to see if a pilot is in sensor range of another. | |
| int | pilot_inRangeSpob (const Pilot *p, int target) |
| Check to see if a spob is in sensor range of the pilot. | |
| int | pilot_inRangeAsteroid (const Pilot *p, int ast, int fie) |
| Check to see if an asteroid is in sensor range of the pilot. | |
| int | pilot_inRangeJump (const Pilot *p, int i) |
| Check to see if a jump point is in sensor range of the pilot. | |
| double | pilot_ewWeaponTrack (const Pilot *p, const Pilot *t, double trackmin, double trackmax) |
| Calculates the weapon lead (1. is 100%, 0. is 0%).. | |
| void | pilot_ewUpdateStealth (Pilot *p, double dt) |
| Updates the stealth mode and checks to see if it is getting broken. | |
| int | pilot_stealth (Pilot *p) |
| Stealths a pilot. | |
| void | pilot_destealth (Pilot *p) |
| Destealths a pilot. | |
Variables | |
| static double | ew_interference = 1. |
Pilot electronic warfare information.
Definition in file pilot_ew.c.
| void pilot_destealth | ( | Pilot * | p | ) |
Destealths a pilot.
Definition at line 585 of file pilot_ew.c.
|
static |
Gets the electronic warfare asteroid modifier.
| p | Pilot. |
Definition at line 173 of file pilot_ew.c.
|
static |
Gets the electronic warfare jump point modifier.
| p | Pilot. |
Definition at line 187 of file pilot_ew.c.
|
static |
Gets the electronic warfare mass modifier for a given mass.
| mass | Mass to get the electronic warfare mass modifier of. |
Definition at line 162 of file pilot_ew.c.
| int pilot_ewScanCheck | ( | const Pilot * | p | ) |
Checks to see if a scan is done.
| p | Pilot to check. |
Definition at line 74 of file pilot_ew.c.
| void pilot_ewScanStart | ( | Pilot * | p | ) |
Initializes the scan timer for a pilot.
| p | Pilot to set scan timer for. |
Definition at line 54 of file pilot_ew.c.
| double pilot_ewScanTime | ( | const Pilot * | p | ) |
Gets the time it takes to scan a pilot.
| p | Pilot to scan. |
Definition at line 40 of file pilot_ew.c.
|
static |
Checks to see if there are pilots nearby to a stealthed pilot that could break stealth.
| p | Pilot to check. |
| mod | Distance-dependent trength modifier. |
| close | Number of pilots nearby. |
| isplayer | Whether or not the player is the pilot breaking stealth. |
Definition at line 431 of file pilot_ew.c.
|
static |
Updates all the internal values.
Definition at line 84 of file pilot_ew.c.
| void pilot_ewUpdateDynamic | ( | Pilot * | p, |
| double | dt ) |
Updates the pilot's dynamic electronic warfare properties.
| p | Pilot to update. |
| dt | Delta time increment (seconds). |
Definition at line 113 of file pilot_ew.c.
| void pilot_ewUpdateStatic | ( | Pilot * | p | ) |
Updates the pilot's static electronic warfare properties.
| p | Pilot to update. |
Definition at line 101 of file pilot_ew.c.
| void pilot_ewUpdateStealth | ( | Pilot * | p, |
| double | dt ) |
Updates the stealth mode and checks to see if it is getting broken.
| p | Pilot to update. |
| dt | Current delta-tick. |
Definition at line 497 of file pilot_ew.c.
Calculates the weapon lead (1. is 100%, 0. is 0%)..
| p | Pilot tracking. |
| t | Pilot being tracked. |
| trackmin | Minimum track limit of the weapon. |
| trackmax | Maximum track limit of the weapon. |
Definition at line 407 of file pilot_ew.c.
| int pilot_inRange | ( | const Pilot * | p, |
| double | x, | ||
| double | y ) |
Check to see if a position is in range of the pilot.
| p | Pilot to check to see if position is in their sensor range. |
| x | X position to check. |
| y | Y position to check. |
Definition at line 231 of file pilot_ew.c.
| int pilot_inRangeAsteroid | ( | const Pilot * | p, |
| int | ast, | ||
| int | fie ) |
Check to see if an asteroid is in sensor range of the pilot.
| p | Pilot who is trying to check to see if the asteroid is in sensor range. |
| ast | Asteroid to see if is in sensor range. |
| fie | Field the Asteroid belongs to to see if is in sensor range. |
Definition at line 324 of file pilot_ew.c.
| int pilot_inRangeJump | ( | const Pilot * | p, |
| int | i ) |
Check to see if a jump point is in sensor range of the pilot.
| p | Pilot who is trying to check to see if the jump point is in sensor range. |
| i | target Jump point to see if is in sensor range. |
Definition at line 361 of file pilot_ew.c.
Check to see if a pilot is in sensor range of another.
| p | Pilot who is trying to check to see if other is in sensor range. | |
| target | Target of p to check to see if is in sensor range. | |
| [out] | dist2 | Distance squared of the two pilots. Set to NULL if you're not interested. |
Definition at line 256 of file pilot_ew.c.
| int pilot_inRangeSpob | ( | const Pilot * | p, |
| int | target ) |
Check to see if a spob is in sensor range of the pilot.
| p | Pilot who is trying to check to see if the spob is in sensor range. |
| target | Spob to see if is in sensor range. |
Definition at line 293 of file pilot_ew.c.
| double pilot_sensorRange | ( | void | ) |
Returns the default sensor range for the current system.
Definition at line 218 of file pilot_ew.c.
| int pilot_stealth | ( | Pilot * | p | ) |
Stealths a pilot.
Definition at line 543 of file pilot_ew.c.
| void pilot_updateSensorRange | ( | void | ) |
Updates the system's base sensor range.
Definition at line 208 of file pilot_ew.c.
|
static |
Interference factor.
Definition at line 22 of file pilot_ew.c.