Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <unit.h>
Classes | |
class | Computer |
class | graphic_options |
class | Limits |
struct | UnitJump |
struct | XML |
Public Types | |
enum | DAMAGES { NO_DAMAGE =0x00, SHIELD_DAMAGED =0x01, COMPUTER_DAMAGED =0x02, MOUNT_DAMAGED =0x04, CARGOFUEL_DAMAGED =0x08, JUMP_DAMAGED =0x10, CLOAK_DAMAGED =0x20, LIMITS_DAMAGED =0x40, ARMOR_DAMAGED =0x80 } |
enum | schedulepriorityenum { scheduleDefault, scheduleAField, scheduleRoid } |
enum | COLLIDELOCATIONTYPES { UNIT_ONLY =0, UNIT_BOLT =1, NUM_COLLIDE_MAPS =2 } |
enum | DOCKENUM { NOT_DOCKED =0x0, DOCKED_INSIDE =0x1, DOCKED =0x2, DOCKING_UNITS =0x4 } |
enum | tractorHow { tractorImmune =0, tractorPush =1, tractorIn =2, tractorBoth =3 } |
Public Member Functions | |
Unit (bool kill) | |
void | Kill () |
bool | Killed () |
void | Ref () |
void | UnRef () |
Unit () | |
Unit (int dummy) | |
Unit (std::vector< Mesh * > &meshes, bool Subunit, int faction) | |
Unit (const char *filename, bool SubUnit, int faction, std::string customizedUnit=std::string(""), Flightgroup *flightgroup=NULL, int fg_subnumber=0, std::string *netxml=NULL) | |
void | Init () |
void | Init (const char *filename, bool SubUnit, int faction, std::string customizedUnit=std::string(""), Flightgroup *flightgroup=NULL, int fg_subnumber=0, std::string *netxml=NULL) |
void | LoadRow (class CSVRow &row, std::string unitMod, std::string *netxml=NULL) |
virtual | ~Unit () |
void | SetNetworkMode (bool mode=true) |
ObjSerial | GetSerial () const |
void | SetSerial (ObjSerial) |
void | BackupState () |
bool | UpgradeSubUnitsWithFactory (const Unit *up, int subunitoffset, bool touchme, bool downgrade, int &numave, double &percentage, Unit *(*createupgradesubunit)(std::string s, int faction)) |
virtual bool | UpgradeSubUnits (const Unit *up, int subunitoffset, bool touchme, bool downgrade, int &numave, double &percentage) |
bool | UpgradeMounts (const Unit *up, int subunitoffset, bool touchme, bool downgrade, int &numave, const Unit *templ, double &percentage) |
un_iter | getSubUnits () |
un_kiter | viewSubUnits () const |
bool | isSubUnit () const |
void | setFaceCamera () |
bool | UpAndDownGrade (const Unit *up, const Unit *templ, int mountoffset, int subunitoffset, bool touchme, bool downgrade, int additive, bool forcetransaction, double &percentage, const Unit *downgrade_min, bool force_change_on_nothing, bool gen_downgrade_list) |
void | ImportPartList (const std::string &category, float price, float pricedev, float quantity, float quantdev) |
int | GetNumMounts () const |
void | ClearMounts () |
virtual void | UpgradeInterface (Unit *base) |
bool | canUpgrade (const Unit *upgrador, int mountoffset, int subunitoffset, int additive, bool force, double &percentage, const Unit *templ=NULL, bool force_change_on_nothing=false, bool gen_downgrade_list=true) |
bool | Upgrade (const Unit *upgrador, int mountoffset, int subunitoffset, int additive, bool force, double &percentage, const Unit *templ=NULL, bool force_change_on_nothing=false, bool gen_downgrade_list=true) |
int | RepairCost () |
int | RepairUpgrade () |
bool | RepairUpgradeCargo (Cargo *item, Unit *baseUnit, float *credits) |
Vector | MountPercentOperational (int whichmount) |
bool | ReduceToTemplate () |
virtual double | Upgrade (const std::string &file, int mountoffset, int subunitoffset, bool force, bool loop_through_mounts) |
bool | canDowngrade (const Unit *downgradeor, int mountoffset, int subunitoffset, double &percentage, const Unit *downgradelimit, bool gen_downgrade_list=true) |
bool | Downgrade (const Unit *downgradeor, int mountoffset, int subunitoffset, double &percentage, const Unit *downgradelimit, bool gen_downgrade_list=true) |
unsigned | attackPreference () const |
void | attackPreference (unsigned char) |
unsigned | unitRole () const |
void | unitRole (unsigned char) |
void | setCombatRole (const std::string &s) |
const std::string & | getCombatRole () const |
const std::string & | getUnitRole () const |
void | setUnitRole (const std::string &s) |
const std::string & | getAttackPreference () const |
void | setAttackPreference (const std::string &s) |
void | DamageRandSys (float dam, const Vector &vec, float randum=1, float degrees=1) |
void | SetNebula (Nebula *) |
Nebula * | GetNebula () const |
const std::string & | getCockpit () const |
class Cockpit * | GetVelocityDifficultyMult (float &) const |
void | RemoveFromSystem () |
void | RequestPhysics () |
bool | InCorrectStarSystem (StarSystem *) |
virtual int | nummesh () const |
virtual void | Split (int level) |
virtual void | addHalo (const char *filename, const QVector &loc, const Vector &size, const GFXColor &col, std::string halo_type, float activation) |
std::vector< Mesh * > | StealMeshes () |
virtual bool | Explode (bool draw, float timeit) |
void | Destroy () |
virtual void | Draw (const Transformation &quat=identity_transformation, const Matrix &m=identity_matrix) |
virtual void | DrawNow (const Matrix &m=identity_matrix, float lod=1000000000) |
virtual void | UpdateHudMatrix (int whichcam) |
virtual VSSprite * | getHudImage () const |
virtual void | applyTechniqueOverrides (const std::map< std::string, std::string > &overrides) |
const std::vector< std::string > & | GetDestinations () const |
void | AddDestination (const std::string &) |
void | SwitchCombatFlightMode () |
bool | CombatMode () |
virtual bool | TransferUnitToSystem (StarSystem *NewSystem) |
virtual bool | TransferUnitToSystem (unsigned int whichJumpQueue, class StarSystem *&previouslyActiveStarSystem, bool DoSightAndSound) |
StarSystem * | getStarSystem () |
const StarSystem * | getStarSystem () const |
const UnitJump & | GetJumpStatus () const |
float | CourseDeviation (const Vector &OriginalCourse, const Vector &FinalCourse) const |
Computer & | GetComputerData () |
const Computer & | ViewComputerData () const |
void | ActivateJumpDrive (int destination=0) |
void | DeactivateJumpDrive () |
void | beginElement (const std::string &name, const XMLSupport::AttributeList &attributes) |
void | endElement (const std::string &name) |
void | WriteUnit (const char *modificationname="") |
std::string | WriteUnitString () |
void | LoadXML (const char *filename, const char *unitModifications="", std::string *xmlbuffer=NULL) |
void | LoadXML (VSFileSystem::VSFile &f, const char *unitModifications="", std::string *xmlbuffer=NULL) |
bool | AutoPilotToErrorMessage (Unit *un, bool automaticenergyrealloc, std::string &failuremessage, int recursive_level=2) |
bool | AutoPilotTo (Unit *un, bool automaticenergyrealloc) |
Vector | LocalCoordinates (Unit *un) const |
float | CloakVisible () const |
virtual void | Cloak (bool cloak) |
void | Kill (bool eraseFromSave=true, bool quitting=false) |
bool | Killed () const |
bool | IsExploding () const |
float | ExplodingProgress () const |
float | AfterburnData () const |
void | SetAfterBurn (float aft) |
float | FuelData () const |
float | WarpCapData () const |
void | SetFuel (float f) |
float | EnergyRechargeData () const |
void | SetEnergyRecharge (float enrech) |
void | SetMaxEnergy (float maxen) |
float | MaxEnergyData () const |
float | ShieldRechargeData () const |
float | EnergyData () const |
float | WarpEnergyData () const |
float | GetWarpEnergy () const |
void | DecreaseWarpEnergy (bool insystem, float time=1.0f) |
void | IncreaseWarpEnergy (bool insystem, float time=1.0f) |
bool | RefillWarpEnergy () |
float | rSize () const |
QVector | Position () const |
const Matrix & | GetTransformation () const |
QVector | LocalPosition () const |
void | SetPosition (const QVector &pos) |
void | SetCurPosition (const QVector &pos) |
Sets the cumulative transformation matrix's position...for setting up to be out in the middle of nowhere. More... | |
void | SetPosAndCumPos (const QVector &pos) |
void | SetVisible (bool isvis) |
void | SetAllVisible (bool isvis) |
void | SetGlowVisible (bool isvis) |
void | Rotate (const Vector &axis) |
void | FireEngines (const Vector &Direction, float FuelSpeed, float FMass) |
void | ApplyForce (const Vector &Vforce) |
void | ApplyLocalForce (const Vector &Vforce) |
void | Accelerate (const Vector &Vforce) |
void | ApplyTorque (const Vector &Vforce, const QVector &Location) |
void | ApplyLocalTorque (const Vector &Vforce, const Vector &Location) |
void | ApplyBalancedLocalTorque (const Vector &Vforce, const Vector &Location) |
void | ApplyLocalTorque (const Vector &torque) |
float | ApplyLocalDamage (const Vector &pnt, const Vector &normal, float amt, Unit *affectedSubUnit, const GFXColor &, float phasedamage=0) |
void | ApplyNetDamage (Vector &pnt, Vector &normal, float amt, float ppercentage, float spercentage, GFXColor &color) |
void | ApplyDamage (const Vector &pnt, const Vector &normal, float amt, Unit *affectedSubUnit, const GFXColor &, void *ownerDoNotDereference, float phasedamage=0) |
void | LightShields (const Vector &pnt, const Vector &normal, float amt, const GFXColor &color) |
float | DealDamageToHullReturnArmor (const Vector &pnt, float Damage, float *&targ) |
virtual void | ArmorDamageSound (const Vector &pnt) |
virtual void | HullDamageSound (const Vector &pnt) |
float | DealDamageToHull (const Vector &pnt, float Damage) |
Vector | ClampThrust (const Vector &thrust, bool afterburn) |
Vector | MaxThrust (const Vector &thrust) |
virtual void | Thrust (const Vector &amt, bool afterburn=false) |
void | LateralThrust (float amt) |
void | VerticalThrust (float amt) |
void | LongitudinalThrust (float amt) |
Vector | ClampVelocity (const Vector &velocity, const bool afterburn) |
Vector | ClampAngVel (const Vector &vel) |
Vector | ClampTorque (const Vector &torque) |
Vector | MaxTorque (const Vector &torque) |
void | YawTorque (float amt) |
void | PitchTorque (float amt) |
void | RollTorque (float amt) |
void | Repair () |
void | UpdatePhysics (const Transformation &trans, const Matrix &transmat, const Vector &CumulativeVelocity, bool ResolveLast, UnitCollection *uc, Unit *superunit) |
virtual void | UpdatePhysics2 (const Transformation &trans, const Transformation &old_physical_state, const Vector &accel, float difficulty, const Matrix &transmat, const Vector &CumulativeVelocity, bool ResolveLast, UnitCollection *uc=NULL) |
virtual void | UpdateSubunitPhysics (const Transformation &trans, const Matrix &transmat, const Vector &CumulativeVelocity, bool ResolveLast, UnitCollection *uc, Unit *superunit) |
virtual void | UpdateSubunitPhysics (Unit *subunit, const Transformation &trans, const Matrix &transmat, const Vector &CumulativeVelocity, bool ResolveLast, UnitCollection *uc, Unit *superunit) |
void | AddVelocity (float difficulty) |
virtual Vector | ResolveForces (const Transformation &, const Matrix &) |
void | SetOrientation (QVector q, QVector r) |
void | SetOrientation (Quaternion Q) |
void | SetOrientation (QVector p, QVector q, QVector r) |
void | GetOrientation (Vector &p, Vector &q, Vector &r) const |
Vector | GetNetAcceleration () |
Vector | GetAcceleration () const |
float | GetMaxAccelerationInDirectionOf (const Vector &ref, bool afterburn) const |
Vector | UpCoordinateLevel (const Vector &v) const |
Vector | DownCoordinateLevel (const Vector &v) const |
Vector | ToLocalCoordinates (const Vector &v) const |
Vector | ToWorldCoordinates (const Vector &v) const |
const Vector & | GetAngularVelocity () const |
const Vector & | GetVelocity () const |
Vector | GetWarpVelocity () const |
void | SetVelocity (const Vector &) |
void | SetAngularVelocity (const Vector &) |
float | GetMoment () const |
float | GetMass () const |
float | GetElasticity () |
const Limits & | Limits () const |
void | SetResolveForces (bool) |
void | setAverageGunSpeed () |
int | LockMissile () const |
void | LockTarget (bool myboo) |
bool | TargetLocked () const |
float | TrackingGuns (bool &missileLock) |
void | ToggleWeapon (bool Missile, bool forward=true) |
void | SelectAllWeapon (bool Missile) |
void | getAverageGunSpeed (float &speed, float &grange, float &mrange) const |
QVector | PositionITTS (const QVector &firingposit, Vector firingvelocity, float gunspeed, bool smooth_itts) const |
float | FShieldData () const |
float | RShieldData () const |
float | LShieldData () const |
float | BShieldData () const |
void | ArmorData (float armor[8]) const |
float | GetHull () const |
float | GetHullPercent () const |
void | Fire (unsigned int bitmask, bool beams_target_owner=false) |
void | UnFire () |
void | leach (float XshieldPercent, float YrechargePercent, float ZenergyPercent) |
bool | InRange (Unit *target, bool cone=true, bool cap=true) const |
bool | InRange (Unit *target, double &mm, bool cone, bool cap, bool lock) const |
Unit * | Target () |
Unit * | VelocityReference () |
Unit * | Threat () |
void | VelocityReference (Unit *targ) |
void | TargetTurret (Unit *targ) |
void | Threaten (Unit *targ, float danger) |
void | ResetThreatLevel () |
float | cosAngleTo (Unit *target, float &distance, float speed=0.001, float range=0.001, bool turnmargin=true) const |
float | cosAngleFromMountTo (Unit *target, float &distance) const |
float | computeLockingPercent () |
void | Select () |
void | Deselect () |
void | Target (Unit *targ) |
void | setTargetFg (std::string primary, std::string secondary=std::string(), std::string tertiary=std::string()) |
void | ReTargetFg (int which_target=0) |
bool | CanAddCargo (const Cargo &carg) const |
void | AddCargo (const Cargo &carg, bool sort=true) |
int | RemoveCargo (unsigned int i, int quantity, bool eraseZero=true) |
float | PriceCargo (const std::string &s) |
Cargo & | GetCargo (unsigned int i) |
const Cargo & | GetCargo (unsigned int i) const |
void | GetSortedCargoCat (const std::string &category, size_t &catbegin, size_t &catend) |
Cargo * | GetCargo (const std::string &s, unsigned int &i) |
const Cargo * | GetCargo (const std::string &s, unsigned int &i) const |
unsigned int | numCargo () const |
std::string | GetManifest (unsigned int i, Unit *scanningUnit, const Vector &original_velocity) const |
bool | SellCargo (unsigned int i, int quantity, float &creds, Cargo &carg, Unit *buyer) |
bool | SellCargo (const std::string &s, int quantity, float &creds, Cargo &carg, Unit *buyer) |
bool | BuyCargo (const Cargo &carg, float &creds) |
bool | BuyCargo (unsigned int i, unsigned int quantity, Unit *buyer, float &creds) |
bool | BuyCargo (const std::string &cargo, unsigned int quantity, Unit *buyer, float &creds) |
void | EjectCargo (unsigned int index) |
float | getEmptyCargoVolume (void) const |
float | getCargoVolume (void) const |
float | getEmptyUpgradeVolume (void) const |
float | getUpgradeVolume (void) const |
float | getHiddenCargoVolume (void) const |
class csOPCODECollider * | getCollideTree (const Vector &scale=Vector(1, 1, 1), const std::vector< struct mesh_polygon > *=NULL) |
Order * | getAIState () const |
void | PrimeOrders () |
void | PrimeOrdersLaunched () |
void | PrimeOrders (Order *newAI) |
void | SetAI (Order *newAI) |
void | EnqueueAI (Order *newAI) |
void | EnqueueAIFirst (Order *newAI) |
void | LoadAIScript (const std::string &aiscript) |
bool | LoadLastPythonAIScript () |
bool | EnqueueLastPythonAIScript () |
double | getMinDis (const QVector &pnt) |
void | SetTurretAI () |
void | DisableTurretAI () |
std::string | getFullAIDescription () |
void | eraseOrderType (unsigned int type) |
void | ExecuteAI () |
void | SetCollisionParent (Unit *name) |
void | SetOwner (Unit *target) |
void | SetRecursiveOwner (Unit *target) |
Unit * | rayCollide (const QVector &st, const QVector &end, Vector &normal, float &distance) |
void | calculate_extent (bool update_collide_queue) |
bool | Inside (const QVector &position, const float radius, Vector &normal, float &dist) |
void | UpdateCollideQueue (StarSystem *ss, CollideMap::iterator hint[NUM_COLLIDE_MAPS]) |
bool | querySphere (const QVector &pnt, float err) const |
float | querySphere (const QVector &start, const QVector &end, float my_unit_radius=0) const |
float | querySphereNoRecurse (const QVector &start, const QVector &end, float my_unit_radius=0) const |
float | querySphereClickList (const QVector &st, const QVector &dir, float err) const |
bool | queryFrustum (double frustum[6][4]) const |
virtual bool | querySphereClickList (int, int, float err, Camera *activeCam) |
bool | InsideCollideTree (Unit *smaller, QVector &bigpos, Vector &bigNormal, QVector &smallpos, Vector &smallNormal, bool bigasteroid=false, bool smallasteroid=false) |
virtual void | reactToCollision (Unit *smaller, const QVector &biglocation, const Vector &bignormal, const QVector &smalllocation, const Vector &smallnormal, float dist) |
bool | jumpReactToCollision (Unit *smaller) |
bool | Collide (Unit *target) |
void | CollideAll () |
int | CanDockWithMe (Unit *dockingunit, bool forcedock=false) |
int | ForceDock (Unit *utdw, unsigned int whichdockport) |
void | PerformDockingOperations () |
void | FreeDockingPort (unsigned int whichport) |
const std::vector< struct DockingPorts > & | DockingPortLocations () const |
char | DockedOrDocking () const |
bool | IsCleared (const Unit *dockignunit) const |
bool | isDocked (const Unit *dockingUnit) const |
bool | UnDock (Unit *unitToDockWith) |
bool | RequestClearance (Unit *dockingunit) |
bool | EndRequestClearance (Unit *dockingunit) |
bool | hasPendingClearanceRequests () const |
int | Dock (Unit *unitToDockWith) |
void | RestoreGodliness () |
void | SetFg (Flightgroup *fg, int fg_snumber) |
void | SetFaction (int faction) |
Flightgroup * | getFlightgroup () const |
int | getFgSubnumber () const |
const std::string | getFgID () |
std::vector< class CargoColor > & | FilterDowngradeList (std::vector< class CargoColor > &mylist, bool downgrade=true) |
std::vector< class CargoColor > & | FilterUpgradeList (std::vector< class CargoColor > &mylist) |
bool | IsBase () const |
bool | isTractorable (enum tractorHow how=tractorBoth) const |
void | setTractorability (enum tractorHow how) |
enum tractorHow | getTractorability () const |
void | setFullname (std::string name) |
const string & | getFullname () const |
const string & | getFilename () const |
virtual enum clsptr | isUnit () const |
void | Ref () |
void | UnRef () |
UnitImages< void > & | GetImageInformation () |
bool | isStarShip () const |
bool | isPlanet () const |
bool | isJumppoint () const |
bool | isEnemy (const Unit *other) const |
bool | isFriend (const Unit *other) const |
bool | isNeutral (const Unit *other) const |
float | getRelation (const Unit *other) const |
void | TurretFAW () |
Static Public Member Functions | |
static void | ProcessDeleteQueue () |
static void | beginElement (void *userData, const XML_Char *name, const XML_Char **atts) |
static void | endElement (void *userData, const XML_Char *name) |
static Unit * | makeMasterPartList () |
Protected Types | |
enum | INVIS { DEFAULTVIS =0x0, INVISGLOW =0x1, INVISUNIT =0x2, INVISCAMERA =0x4 } |
Protected Member Functions | |
Unit (const Unit &) | |
Unit & | operator= (const Unit &) |
virtual float | ExplosionRadius () |
void | ActivateGuns (const weapon_info *, bool Missile) |
cycles through the loop twice turning on all matching to ms weapons of size or after size More... | |
float | MaxShieldVal () const |
void | RegenShields () |
virtual float | DealDamageToShield (const Vector &pnt, float &Damage) |
bool | ShieldUp (const Vector &) const |
void | SortCargo () |
Static Protected Member Functions | |
static std::string | massSerializer (const struct XMLType &input, void *mythis) |
static std::string | cargoSerializer (const struct XMLType &input, void *mythis) |
static std::string | mountSerializer (const struct XMLType &input, void *mythis) |
static std::string | shieldSerializer (const struct XMLType &input, void *mythis) |
static std::string | subunitSerializer (const struct XMLType &input, void *mythis) |
Protected Attributes | |
StringPool::Reference | csvRow |
bool | networked |
ObjSerial | serial |
Vector | net_accel |
unsigned char | attack_preference |
unsigned char | unit_role |
Nebula * | nebula |
float | shieldtight |
float | fuel |
float | afterburnenergy |
int | afterburntype |
float | Momentofinertia |
Vector | SavedAccel |
unsigned char | invisible |
float | maxhull |
float | recharge |
float | maxenergy |
float | maxwarpenergy |
float | warpenergy |
StringPool::Reference | target_fgid [3] |
Flightgroup * | flightgroup |
int | flightgroup_subnumber |
std::string | fullname |
Friends | |
class | UnitFactory |
class | Mount |
class | PlanetaryOrbit |
class | ContinuousTerrain |
class | VDU |
class | UpgradingInfo |
Unit contains any physical object that may collide with something And may be physically affected by forces. Units are assumed to have various damage and explode when they are dead. Units may have any number of weapons which, themselves may be units the aistate indicates how the unit will behave in the upcoming phys frame
enum Unit::DAMAGES |
Enumerator | |
---|---|
NO_DAMAGE | |
SHIELD_DAMAGED | |
COMPUTER_DAMAGED | |
MOUNT_DAMAGED | |
CARGOFUEL_DAMAGED | |
JUMP_DAMAGED | |
CLOAK_DAMAGED | |
LIMITS_DAMAGED | |
ARMOR_DAMAGED |
Definition at line 297 of file unit_generic.h.
enum Unit::DOCKENUM |
Enumerator | |
---|---|
NOT_DOCKED | |
DOCKED_INSIDE | |
DOCKED | |
DOCKING_UNITS |
Definition at line 1425 of file unit_generic.h.
|
protected |
Enumerator | |
---|---|
scheduleDefault | |
scheduleAField | |
scheduleRoid |
Definition at line 781 of file unit_generic.h.
enum Unit::tractorHow |
Enumerator | |
---|---|
tractorImmune | |
tractorPush | |
tractorIn | |
tractorBoth |
Definition at line 1487 of file unit_generic.h.
|
inline |
|
protected |
Unit::Unit | ( | ) |
Definition at line 759 of file unit_generic.cpp.
References aistate, UnitImages< BOGUS >::cockpit_damage, FactionUtil::GetNeutralFaction(), Init(), pilot, pImage, and sound.
Referenced by makeMasterPartList().
Unit::Unit | ( | int | dummy) |
Default constructor. This is just to figure out where default constructors are used. The useless argument will be removed again later.
Definition at line 748 of file unit_generic.cpp.
References aistate, UnitImages< BOGUS >::cockpit_damage, FactionUtil::GetNeutralFaction(), Init(), pilot, pImage, and sound.
Constructor that creates aa mesh with meshes as submeshes (number of them) as either as subunit with faction faction
Definition at line 770 of file unit_generic.cpp.
References aistate, calculate_extent(), UnitImages< BOGUS >::cockpit_damage, faction, graphicOptions, hull, Init(), maxhull, meshdata, pilot, pImage, Pilot::SetComm(), sound, and Unit::graphic_options::SubUnit.
Unit::Unit | ( | const char * | filename, |
bool | SubUnit, | ||
int | faction, | ||
std::string | customizedUnit = std::string("") , |
||
Flightgroup * | flightgroup = NULL , |
||
int | fg_subnumber = 0 , |
||
std::string * | netxml = NULL |
||
) |
Constructor that creates a mesh from an XML file If it is a customizedUnit, it will check in that directory in the home dir for the unit.
|
virtual |
Definition at line 809 of file unit_generic.cpp.
References UnitImages< BOGUS >::cockpit_damage, killed, meshdata, mounts, name, UnitImages< BOGUS >::pHudImage, pilot, pImage, pMeshAnimation, sound, ucref, UnitImages< BOGUS >::unitwriter, and VSFileSystem::vs_fprintf().
void Unit::Accelerate | ( | const Vector & | Vforce) |
Definition at line 3235 of file unit_generic.cpp.
References FINITE, and VSFileSystem::vs_fprintf().
|
protected |
cycles through the loop twice turning on all matching to ms weapons of size or after size
Definition at line 5414 of file unit_generic.cpp.
References Mount::DESTROYED, isMissile(), j, and weapon_info::type.
void Unit::ActivateJumpDrive | ( | int | destination = 0 ) |
Definition at line 621 of file unit_generic.cpp.
Referenced by Orders::AggressiveAI::Execute(), FlyByKeyboard::Execute(), Orders::AggressiveAI::ExecuteNoEnemies(), and GameUnit< UnitType >::TransferUnitToSystem().
Definition at line 8232 of file unit_generic.cpp.
References _Universe, NetServer::BroadcastCargoUpgrade(), NetClient::cargoRequest(), Cargo::GetContent(), VegaConfig::getVariable(), Cargo::mass, Cargo::mission, Universe::netLocked(), Network, XMLSupport::parse_bool(), Cargo::price, Cargo::quantity, SERVER, Cargo::volume, vs_config, VSServer, and Universe::whichPlayerStarship().
Referenced by AddCarg(), UnitUtil::addCargo(), Beam::Collide(), BaseComputer::SellUpgradeOperation::concludeTransaction(), Enslave(), UnitUtil::forceAddCargo(), UnitUtil::incrementCargo(), makeMasterPartList(), and SellCargo().
void Unit::AddDestination | ( | const std::string & | dest) |
Definition at line 1605 of file unit_generic.cpp.
Referenced by Planet::InitPlanet().
|
inlinevirtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 516 of file unit_generic.h.
Referenced by AddLights().
void Unit::AddVelocity | ( | float | difficulty) |
Definition at line 2674 of file unit_generic.cpp.
References _Universe, CalculateNearestWarpUnit(), cumulative_velocity, VegaConfig::getVariable(), Universe::isPlayerStarship(), XMLSupport::parse_float(), SIMULATION_ATOM, UniverseUtil::sqrt(), v, Vector, and vs_config.
|
inline |
Definition at line 896 of file unit_generic.h.
References afterburnenergy.
Referenced by ZoneMgr::addDamage().
Definition at line 3257 of file unit_generic.cpp.
void Unit::ApplyDamage | ( | const Vector & | pnt, |
const Vector & | normal, | ||
float | amt, | ||
Unit * | affectedSubUnit, | ||
const GFXColor & | color, | ||
void * | ownerDoNotDereference, | ||
float | phasedamage = 0 |
||
) |
Definition at line 4206 of file unit_generic.cpp.
References _Universe, AllUnitsCloseAndEngage(), c, Order::Communicate(), faction, findUnitInStarsystem(), CommunicationMessage::fsm, getAIState(), Pilot::getCommFaces(), FSM::GetDamagedNode(), FSM::GetDealtDamageNode(), FSM::GetHitNode(), FactionUtil::GetNeutralFaction(), Cockpit::GetParent(), VegaConfig::getVariable(), InvTransform(), Universe::isPlayerStarship(), Universe::isPlayerStarshipVoid(), isUnit(), Network, owner, XMLSupport::parse_bool(), XMLSupport::parse_float(), pilot, ScoreKill(), SERVER, CommunicationMessage::SetCurrentState(), UNITPTR, Vector, and vs_config.
Referenced by MissileEffect::ApplyDamage(), UnitWrapper::ApplyDamage(), Bolt::Collide(), ContinuousTerrain::Collide(), Beam::Collide(), DealPossibleJumpDamage(), and reactToCollision().
void Unit::ApplyForce | ( | const Vector & | Vforce) |
Definition at line 3218 of file unit_generic.cpp.
References FINITE, Vforce, and VSFileSystem::vs_fprintf().
Referenced by ContinuousTerrain::Collide(), Beam::Collide(), reactToCollision(), and GameUnit< UnitType >::Split().
float Unit::ApplyLocalDamage | ( | const Vector & | pnt, |
const Vector & | normal, | ||
float | amt, | ||
Unit * | affectedSubUnit, | ||
const GFXColor & | color, | ||
float | phasedamage = 0 |
||
) |
Definition at line 4079 of file unit_generic.cpp.
References _Universe, GFXColor::a, ApplyLocalDamage(), GFXColor::b, game_data_t::difficulty, GFXColor::g, g_game, VegaConfig::getVariable(), Universe::isPlayerStarship(), XMLSupport::parse_bool(), XMLSupport::parse_float(), GFXColor::r, NetServer::sendDamages(), SERVER, Vector, vs_config, and VSServer.
Referenced by ApplyLocalDamage().
void Unit::ApplyLocalForce | ( | const Vector & | Vforce) |
Definition at line 3227 of file unit_generic.cpp.
References FINITE, Vforce, and VSFileSystem::vs_fprintf().
Referenced by Orders::MoveToParent::Execute().
Definition at line 3250 of file unit_generic.cpp.
References Vforce.
Referenced by Orders::MatchAngularVelocity::Execute(), Orders::ChangeHeading::Execute(), and GameUnit< UnitType >::Split().
void Unit::ApplyLocalTorque | ( | const Vector & | torque) |
Definition at line 3262 of file unit_generic.cpp.
void Unit::ApplyNetDamage | ( | Vector & | pnt, |
Vector & | normal, | ||
float | amt, | ||
float | ppercentage, | ||
float | spercentage, | ||
GFXColor & | color | ||
) |
Definition at line 4167 of file unit_generic.cpp.
References _Universe, VegaConfig::getVariable(), Universe::isPlayerStarship(), XMLSupport::parse_float(), Cockpit::Shake(), Vector, and vs_config.
|
virtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 8965 of file unit_generic.cpp.
Definition at line 3243 of file unit_generic.cpp.
References Vforce.
Referenced by reactToCollision().
|
inlinevirtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 1014 of file unit_generic.h.
void Unit::ArmorData | ( | float | armor[8]) | const |
Definition at line 4704 of file unit_generic.cpp.
Referenced by GameCockpit::LookupUnitStat(), UnitUtil::PercentOperational(), Cockpit::SetParent(), and SuicideKey().
|
inline |
Definition at line 455 of file unit_generic.h.
References attack_preference.
Referenced by AssignTBin(), Orders::FireAt::ChooseTargets(), getProperScript(), Priority(), and Missile::UpdatePhysics2().
void Unit::attackPreference | ( | unsigned char | c) |
Definition at line 103 of file unit_generic.cpp.
References c.
Definition at line 143 of file unit_generic.cpp.
Referenced by Cockpit::Autopilot(), GameCockpit::LookupUnitStat(), GameCockpit::UpdAutoPilot(), Cockpit::UpdAutoPilot(), and WarpToP().
bool Unit::AutoPilotToErrorMessage | ( | Unit * | un, |
bool | automaticenergyrealloc, | ||
std::string & | failuremessage, | ||
int | recursive_level = 2 |
||
) |
Definition at line 2844 of file unit_generic.cpp.
References _Universe, Universe::activeStarSystem(), AddWarp(), UniverseUtil::asin(), Mission::AUTO_NORMAL, Mission::AUTO_OFF, AutoPilotToErrorMessage(), AutoSafeEntrancePoint(), UniverseUtil::cacheAnimation(), ComputeAutoGuarantee(), UnitCollection::createIterator(), XMLSupport::escaped_string(), Unit::graphic_options::FaceCamera, FINITE, GenerateAutoError(), getAIState(), getAutoRSize(), UnitUtil::getDistance(), getFlightgroup(), UniverseUtil::getPlanetRadiusPercent(), getRelation(), UnitContainer::GetUnit(), StarSystem::getUnitList(), VegaConfig::getVariable(), globQueryShell(), graphicOptions, UnitUtil::isAsteroid(), Universe::isPlayerStarship(), UnitUtil::isSun(), isUnit(), Flightgroup::leader, Magnitude(), NEBULAPTR, XMLSupport::parse_bool(), XMLSupport::parse_float(), PI, PLANETPTR, UniverseUtil::playAnimationGrow(), Position(), Order::PursueTarget(), q, QVector, RealPosition(), Rotate(), rSize(), UniverseUtil::SafeEntrancePoint(), SetPosition(), start, v, Vector, viewSubUnits(), and vs_config.
Referenced by GameCockpit::Autopilot(), and AutoPilotToErrorMessage().
void Unit::BackupState | ( | ) |
|
static |
Definition at line 104 of file unit_xml.cpp.
void Unit::beginElement | ( | const std::string & | name, |
const XMLSupport::AttributeList & | attributes | ||
) |
float Unit::BShieldData | ( | ) | const |
Definition at line 4780 of file unit_generic.cpp.
Referenced by GameCockpit::LookupTargetStat(), GameCockpit::LookupUnitStat(), Orders::AggressiveAI::ProcessLogicItem(), Orders::AggressiveAI::SetParent(), and UpAndDownGrade().
Definition at line 8483 of file unit_generic.cpp.
References _Universe, Universe::netLocked(), Network, Cargo::price, Cargo::quantity, NetServer::sendCredits(), SERVER, and VSServer.
Referenced by BaseComputer::buySelectedCargo(), and BaseComputer::buyUpgrade().
Definition at line 8496 of file unit_generic.cpp.
References UnitImages< BOGUS >::cargo, pImage, Cargo::quantity, and RemoveCargo().
bool Unit::BuyCargo | ( | const std::string & | cargo, |
unsigned int | quantity, | ||
Unit * | buyer, | ||
float & | creds | ||
) |
Definition at line 8511 of file unit_generic.cpp.
References GetCargo().
void Unit::calculate_extent | ( | bool | update_collide_queue) |
Definition at line 1359 of file unit_generic.cpp.
References a, corner_max, corner_min, FINITE, LocalPosition(), PLANETPTR, tmpmax(), and Vector.
Referenced by LoadRow(), and Unit().
Definition at line 8265 of file unit_generic.cpp.
References CanAddCargo(), cargoIsUpgrade(), Cargo::quantity, and Cargo::volume.
Referenced by UnitUtil::addCargo(), CanAddCargo(), Beam::Collide(), Enslave(), UnitUtil::incrementCargo(), BaseComputer::isTransactionOK(), and SellCargo().
Definition at line 5937 of file unit_generic.cpp.
References docked, UnitImages< BOGUS >::dockingports, GetTransformation(), insideDock(), InvTransform(), j, pImage, Position(), rSize(), and Transform().
Referenced by Orders::AutoDocking::ApproachState(), CrashForceDock(), Dock(), and GameCockpit::LookupUnitStat().
bool Unit::canDowngrade | ( | const Unit * | downgradeor, |
int | mountoffset, | ||
int | subunitoffset, | ||
double & | percentage, | ||
const Unit * | downgradelimit, | ||
bool | gen_downgrade_list = true |
||
) |
Definition at line 6660 of file unit_generic.cpp.
Referenced by BaseComputer::SellUpgradeOperation::checkTransaction(), and BaseComputer::SellUpgradeOperation::concludeTransaction().
bool Unit::canUpgrade | ( | const Unit * | upgrador, |
int | mountoffset, | ||
int | subunitoffset, | ||
int | additive, | ||
bool | force, | ||
double & | percentage, | ||
const Unit * | templ = NULL , |
||
bool | force_change_on_nothing = false , |
||
bool | gen_downgrade_list = true |
||
) |
Definition at line 6612 of file unit_generic.cpp.
Referenced by BaseComputer::BuyUpgradeOperation::checkTransaction(), BaseComputer::BuyUpgradeOperation::concludeTransaction(), UnitUtil::PercentOperational(), and BaseComputer::BuyUpgradeOperation::selectMount().
|
staticprotected |
Definition at line 8753 of file unit_generic.cpp.
References UnitImages< BOGUS >::cargo, CargoToString(), pImage, and SortCargo().
Definition at line 3376 of file unit_generic.cpp.
References Vector.
Referenced by Orders::FireAt::MatchAngularVelocity(), and Orders::FireAt::MatchVelocity().
Definition at line 3410 of file unit_generic.cpp.
References copysign(), fprintf, GetFuelUsage(), VegaConfig::getVariable(), ISNAN, XMLSupport::parse_bool(), XMLSupport::parse_float(), SIMULATION_ATOM, Vector, and vs_config.
Definition at line 3284 of file unit_generic.cpp.
References copysign(), fprintf, GetFuelUsage(), VegaConfig::getVariable(), ISNAN, XMLSupport::parse_bool(), XMLSupport::parse_float(), SIMULATION_ATOM, Vector, and vs_config.
Definition at line 3343 of file unit_generic.cpp.
References VegaConfig::getVariable(), XMLSupport::parse_float(), SIMULATION_ATOM, and vs_config.
Referenced by AfterburnerSlide(), AfterburnTurnAway(), AfterburnTurnTowards(), AfterburnTurnTowardsITTS(), AfterburnVeerAndTurnAway(), CloakForScript(), CoastToStop(), FlyStraight(), FlyStraightAfterburner(), KickstopBase(), Orders::FireAt::MatchLinearVelocity(), Orders::FireAt::MatchVelocity(), Orders::AggressiveAI::ProcessCurrentFgDirective(), SheltonSlide(), SkilledABSlide(), Stop(), Takeoff(), TakeoffEveryZig(), TurnAway(), TurnTowards(), TurnTowardsITTS(), and VectorThrustHelper().
void Unit::ClearMounts | ( | ) |
Definition at line 3359 of file unit_generic.cpp.
References AUDDeleteSound(), weapon_info::BEAM, ClearMounts(), DestroyMount(), and j.
Referenced by ClearMounts().
|
virtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 5344 of file unit_generic.cpp.
References VegaConfig::getVariable(), XMLSupport::parse_bool(), and vs_config.
Referenced by CloakFor::Execute(), FireKeyboard::Execute(), and CloakFor::~CloakFor().
|
inline |
Definition at line 876 of file unit_generic.h.
References cloaking.
Referenced by Orders::FireAt::Execute(), InRange(), and ChooseTargetClass< numTuple >::ShouldTargetUnit().
Definition at line 246 of file unit_collide.cpp.
References _Universe, Universe::activeStarSystem(), ASTEROIDPTR, collideTrees::colTree(), colTrees, DOCKED, DOCKED_INSIDE, DockedOrDocking(), VegaConfig::getVariable(), Inside(), InsideCollideTree(), isDocked(), Universe::isPlayerStarship(), isUnit(), StarSystem::last_collisions, mysqr(), NEBULAPTR, Network, owner, XMLSupport::parse_float(), Position(), QVector, radial_size, reactToCollision(), rSize(), Vector, Velocity, and vs_config.
Referenced by CollideChecker< T, canbebolt >::CheckCollision().
void Unit::CollideAll | ( | ) |
Definition at line 94 of file unit_collide.cpp.
References CollideMap::CheckCollisions(), StarSystem::collidemap, getStarSystem(), VegaConfig::getVariable(), CollideArray::insert(), is_null(), isSubUnit(), killed, location, NUM_COLLIDE_MAPS, XMLSupport::parse_bool(), UNIT_BOLT, and vs_config.
Referenced by StarSystem::UpdateUnitPhysics().
bool Unit::CombatMode | ( | ) |
Definition at line 3338 of file unit_generic.cpp.
Referenced by GameCockpit::LookupUnitStat().
float Unit::computeLockingPercent | ( | ) |
Definition at line 51 of file cockpit_generic.cpp.
References Mount::ACTIVE, weapon_info::CAPSHIPHEAVYMISSILE, weapon_info::CAPSHIPLIGHTMISSILE, GetNumMounts(), weapon_info::HEAVYMISSILE, i, weapon_info::LIGHTMISSILE, weapon_info::MEDIUMMISSILE, mounts, weapon_info::PROJECTILE, weapon_info::SPECIAL, and weapon_info::SPECIALMISSILE.
Definition at line 1760 of file unit_generic.cpp.
References Transformation::Compose(), Matrix::getR(), Transformation::position, PositionITTS(), QVector, rSize(), Transformation::to_matrix(), and Vector.
Referenced by UnitWrapper::cosAngleFromMountTo().
float Unit::cosAngleTo | ( | Unit * | target, |
float & | distance, | ||
float | speed = 0.001 , |
||
float | range = 0.001 , |
||
bool | turnmargin = true |
||
) | const |
Definition at line 1727 of file unit_generic.cpp.
References UniverseUtil::cos(), cumulative_transformation_matrix, faction, FINITE, GetDestinations(), Matrix::getP(), PositionITTS(), QVector, rSize(), safeacos(), SIMULATION_ATOM, tmpmax(), and Vector.
Referenced by UnitWrapper::cosAngleToITTS(), and GameCockpit::LookupUnitStat().
Definition at line 8775 of file unit_generic.cpp.
Referenced by CommunicatingAI::UpdateContrabandSearch().
Definition at line 4290 of file unit_generic.cpp.
References DestroyMount(), float_to_int(), VegaConfig::getVariable(), M_PI, MAXVDUS, mymax(), mymin, XMLSupport::parse_float(), rand01(), and vs_config.
void Unit::DeactivateJumpDrive | ( | ) |
Definition at line 627 of file unit_generic.cpp.
Referenced by FlyByKeyboard::Execute(), and jumpReactToCollision().
Definition at line 197 of file unit_generic.cpp.
Referenced by GameMissile::reactToCollision(), Missile::reactToCollision(), SuicideKey(), GameMissile::UpdatePhysics2(), and Missile::UpdatePhysics2().
Definition at line 4972 of file unit_generic.cpp.
References _Universe, Universe::AccessCockpit(), apply_float_to_unsigned_int(), Cargo::category, DamagedCategory, DestroyPlayerSystem(), DestroySystem(), UnitCollection::empty(), FINITE, UnitUtil::GetCargo(), Cargo::GetCategory(), FactionUtil::GetFactionIndex(), FactionUtil::GetNeutralFaction(), GetNumMounts(), FactionUtil::GetUpgradeFaction(), VegaConfig::getVariable(), Cockpit::godliness, Universe::isPlayerStarship(), loadUnitByCache(), Network, FactionUtil::neutralfac, XMLSupport::parse_bool(), XMLSupport::parse_float(), XMLSupport::parse_int(), VSRandom::rand(), rand01(), SERVER, SubUnits, UNITPTR, vs_config, VS_RAND_MAX, and vsrandom.
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 5152 of file unit_generic.cpp.
References UniverseUtil::atan(), FINITE, Network, SERVER, UniverseUtil::sqrt(), and withinShield().
Definition at line 3087 of file unit_generic.cpp.
References VegaConfig::getVariable(), XMLSupport::parse_bool(), XMLSupport::parse_float(), and vs_config.
Referenced by ForceDock(), and StarSystem::ProcessPendingJumps().
void Unit::Deselect | ( | ) |
Definition at line 1819 of file unit_generic.cpp.
void Unit::Destroy | ( | ) |
Definition at line 5594 of file unit_generic.cpp.
References DestroyMount(), NetServer::sendKill(), SERVER, SIMULATION_ATOM, and VSServer.
void Unit::DisableTurretAI | ( | ) |
Definition at line 2106 of file unit_generic.cpp.
References aistate, Order::Destroy(), DisableTurretAI(), Order::SetParent(), and UnFire().
Referenced by createObjects(), DisableTurretAI(), FireKeyboard::Execute(), SwitchUnits2(), and Cockpit::Update().
Definition at line 5905 of file unit_generic.cpp.
References _Universe, CanDockWithMe(), UnitImages< BOGUS >::clearedunits, NetClient::dockRequest(), Network, pImage, serial, and Universe::whichPlayerStarship().
Referenced by Orders::DockingOps::DockToTarget(), LoadRow(), and TryDock().
|
inline |
Definition at line 1432 of file unit_generic.h.
References docked.
Referenced by Collide(), UnitUtil::hasDockingUnits(), and StarSystem::JumpTo().
const std::vector< struct DockingPorts > & Unit::DockingPortLocations | ( | ) | const |
Definition at line 5733 of file unit_generic.cpp.
Referenced by Orders::AutoDocking::ApproachState(), Orders::DockingOps::DockToTarget(), DrawDockingBoxes(), Orders::AutoDocking::EnqueuePort(), anonymous_namespace{autodocking.cpp}::FindDockingPort(), UnitUtil::isDockableUnit(), Orders::DockingOps::Movement(), RequestClearence(), SelectDockPort(), and Orders::AutoDocking::UndockingState().
Definition at line 4039 of file unit_generic.cpp.
References TransformNormal().
Referenced by CheckAccessory().
bool Unit::Downgrade | ( | const Unit * | downgradeor, |
int | mountoffset, | ||
int | subunitoffset, | ||
double & | percentage, | ||
const Unit * | downgradelimit, | ||
bool | gen_downgrade_list = true |
||
) |
Definition at line 6681 of file unit_generic.cpp.
Referenced by BaseComputer::SellUpgradeOperation::concludeTransaction().
|
inlinevirtual |
Reimplemented in Planet, GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, GameUnit< Nebula >, and AtmosphereHalo.
Definition at line 533 of file unit_generic.h.
Referenced by MeshAnimation::AnimationStep().
|
inlinevirtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 534 of file unit_generic.h.
void Unit::EjectCargo | ( | unsigned int | index) |
Definition at line 7925 of file unit_generic.cpp.
References _Universe, abletodock(), Universe::activeStarSystem(), StarSystem::AddUnit(), aistate, Cargo::content, UnitFactory::createMissile(), UnitFactory::createUnit(), Universe::CurrentCockpit(), StarSystemGent::faction, faction, ForceDock(), UnitUtil::GetCargo(), Cargo::GetCategory(), GetPosition(), getUniqueSerial(), FactionUtil::GetUpgradeFaction(), VegaConfig::getVariable(), int, Universe::isPlayerStarship(), Kill(), UniverseUtil::LookupUnitStat(), Cargo::mass, Mass, Cargo::mission, name, Flightgroup::nr_ships, Flightgroup::nr_ships_left, Universe::numPlayers(), UnitUtil::owner(), owner, XMLSupport::parse_bool(), XMLSupport::parse_float(), Position(), PrimeOrders(), q, Cargo::quantity, QVector, randVector(), rSize(), Orders::SelectDockPort(), SERVER, SetAI(), SetAngularVelocity(), SetOrientation(), SetOwner(), Cockpit::SetParent(), SetPosAndCumPos(), SetTurretAI(), SetVelocity(), SwitchUnits(), XMLSupport::tostring(), Transform(), TurretFAW(), VSRandom::uniformInc(), UpgradeInterface(), Vector, Cargo::volume, vs_config, and vsrandom.
Referenced by BaseInterface::Room::Eject::Click(), DropCargo(), DropHalfCargo(), DropOneCargo(), FireKeyboard::Execute(), and Cockpit::Update().
|
static |
Definition at line 109 of file unit_xml.cpp.
void Unit::endElement | ( | const std::string & | name) |
Definition at line 5738 of file unit_generic.cpp.
References UnitImages< BOGUS >::clearedunits, and pImage.
Referenced by DoDockingOps(), and Cockpit::Update().
float Unit::EnergyData | ( | ) | const |
Definition at line 4735 of file unit_generic.cpp.
References VegaConfig::getVariable(), XMLSupport::parse_bool(), totalShieldEnergyCapacitance(), and vs_config.
Referenced by GameCockpit::LookupUnitStat(), and Cockpit::Update().
|
inline |
Definition at line 905 of file unit_generic.h.
References recharge.
Referenced by ZoneMgr::addDamage(), FireKeyboard::Execute(), and showUnitStats().
void Unit::EnqueueAI | ( | Order * | newAI) |
Definition at line 1975 of file unit_generic.cpp.
References Order::SetParent().
Referenced by AddUnitToSystem(), createObjects(), UnitUtil::orbit(), Mount::PhysicsAlignedFire(), and SwitchUnits2().
void Unit::EnqueueAIFirst | ( | Order * | newAI) |
Definition at line 1984 of file unit_generic.cpp.
References Order::SetParent().
Referenced by ExecuteRequestClearenceKey(), SetTurretAI(), TurretFAW(), and TurretFAW().
bool Unit::EnqueueLastPythonAIScript | ( | ) |
Definition at line 1920 of file unit_generic.cpp.
References PythonClass< SuperClass >::LastPythonClass().
void Unit::eraseOrderType | ( | unsigned int | type) |
Definition at line 1902 of file unit_generic.cpp.
void Unit::ExecuteAI | ( | ) |
Definition at line 1993 of file unit_generic.cpp.
References ExecuteAI(), UnitUtil::getFgSubnumber(), and getFgSubnumber().
Referenced by ExecuteAI(), StarSystem::ExecuteUnitAI(), and StarSystem::UpdateUnitPhysics().
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 5583 of file unit_generic.cpp.
Referenced by GameUnit< UnitType >::Explode(), and SelfDestruct().
float Unit::ExplodingProgress | ( | ) | const |
Definition at line 5588 of file unit_generic.cpp.
References VegaConfig::getVariable(), min(), XMLSupport::parse_float(), and vs_config.
Referenced by Radar::Track::ExplodingProgress().
|
protectedvirtual |
Reimplemented in Missile.
Definition at line 4697 of file unit_generic.cpp.
References VegaConfig::getVariable(), XMLSupport::parse_float(), and vs_config.
vector< CargoColor > & Unit::FilterDowngradeList | ( | std::vector< class CargoColor > & | mylist, |
bool | downgrade = true |
||
) |
Definition at line 7784 of file unit_generic.cpp.
References ComputeMinDowngradePercent(), UnitFactory::createUnit(), disable, StarSystemGent::faction, ClassCache< Typ, Key >::getCachedConst(), GetModeFromName(), GetNumMounts(), GetUnitDir(), FactionUtil::GetUpgradeFaction(), VegaConfig::getVariable(), name, XMLSupport::parse_bool(), ClassCache< Typ, Key >::setCachedConst(), and vs_config.
Referenced by BaseComputer::loadSellUpgradeControls().
vector< CargoColor > & Unit::FilterUpgradeList | ( | std::vector< class CargoColor > & | mylist) |
Definition at line 7875 of file unit_generic.cpp.
References _Universe, Cockpit::credits, disable, VegaConfig::getVariable(), Universe::isPlayerStarship(), XMLSupport::parse_bool(), and vs_config.
Referenced by BaseComputer::loadBuyUpgradeControls().
Definition at line 1422 of file unit_generic.cpp.
References _Universe, Mount::ACCEPTED, Mount::ACTIVE, Mount::ammo, weapon_info::AUTOTRACKING, Mount::bank, weapon_info::BEAM, NetServer::BroadcastFire(), NetServer::BroadcastUnfire(), Beam::Dissolved(), weapon_info::EnergyRate, ROLES::EVERYTHING_ELSE, Mount::Fire(), ROLES::FIRE_GUNS, ROLES::FIRE_MISSILES, ROLES::FIRE_ONLY_AUTOTRACKERS, Mount::FIRED, NetClient::fireRequest(), getUniqueSerial(), VegaConfig::getVariable(), Mount::REF::gun, index, isMissile(), j, weapon_info::LockTime, Network, Mount::NextMountCloser(), UnitUtil::owner(), XMLSupport::parse_bool(), preEmptiveClientFire(), Mount::PROCESSED, Mount::processed, Beam::Ready(), Mount::ref, Mount::REQUESTED, weapon_info::role_bits, Mount::serial, SERVER, SIMULATION_ATOM, Mount::size, Mount::status, Mount::time_to_lock, weapon_info::type, Mount::type, Mount::UnFire(), vs_config, VSFileSystem::vs_fprintf(), VSServer, and Universe::whichPlayerStarship().
Referenced by Orders::FireAllYouGot::Execute(), Orders::TurretAI::Execute(), FireKeyboard::Execute(), Takeoff(), and TakeoffEveryZig().
Fire engine takes a unit vector for direction and how fast the fuel speed and mass coming out are
Definition at line 3206 of file unit_generic.cpp.
References GetElapsedTime(), VegaConfig::getVariable(), XMLSupport::parse_float(), and vs_config.
Definition at line 5845 of file unit_generic.cpp.
References _Universe, Universe::AccessCockpit(), active_missions, arrested_list_do_not_dereference, Cockpit::credits, DecreaseWarpEnergy(), docked, UnitImages< BOGUS >::dockedunits, UnitImages< BOGUS >::dockingports, Unit::UnitJump::energy, ExecuteDirector(), faction, UniverseUtil::GetMasterPartList(), Cockpit::GetParent(), VegaConfig::getVariable(), IncreaseWarpEnergy(), UnitUtil::isPlayerStarship(), j, jump, Network, XMLSupport::parse_float(), pImage, SERVER, UpdateMasterPartList(), vs_config, WarpCapData(), and WarpEnergyData().
Referenced by CrashForceDock(), Orders::AutoDocking::DockingState(), DockToSavedBases(), EjectCargo(), and SuperDock().
void Unit::FreeDockingPort | ( | unsigned int | whichport) |
Definition at line 5758 of file unit_generic.cpp.
Referenced by BaseInterface::Draw(), and UnDock().
float Unit::FShieldData | ( | ) | const |
Definition at line 4748 of file unit_generic.cpp.
Referenced by GameCockpit::LookupTargetStat(), GameCockpit::LookupUnitStat(), Orders::AggressiveAI::ProcessLogicItem(), Orders::AggressiveAI::ReCommandWing(), Orders::AggressiveAI::SetParent(), and UpAndDownGrade().
float Unit::FuelData | ( | ) | const |
Definition at line 4721 of file unit_generic.cpp.
Referenced by ZoneMgr::addDamage(), GameCockpit::LookupUnitStat(), Cockpit::SetParent(), and showUnitStats().
|
inline |
Definition at line 1086 of file unit_generic.h.
References SavedAccel.
Referenced by Prediction::InitInterpolation(), ShoveCamBehindUnit(), and ShoveCamBelowUnit().
|
inline |
Definition at line 1306 of file unit_generic.h.
References aistate.
Referenced by ApplyDamage(), AutoPilotToErrorMessage(), BaseInterface::Room::Launch::Click(), BaseInterface::Room::Eject::Click(), Beam::Collide(), Mission::DirectorShipDestroyed(), DoDockingOps(), FireKeyboard::Execute(), GetMadAt(), HelpOut(), CommunicatingAI::InitiateContrabandSearch(), CommunicatingAI::ProcessCommMessage(), Order::ProcessCommunicationMessages(), Orders::AggressiveAI::ProcessCurrentFgDirective(), RequestClearence(), ScoreKill(), CommunicatingAI::TerminateContrabandSearch(), TryDock(), and CommunicatingAI::UpdateContrabandSearch().
|
inline |
Definition at line 1101 of file unit_generic.h.
References AngularVelocity.
Referenced by Orders::MatchAngularVelocity::Execute(), Orders::ChangeHeading::Execute(), reactToCollision(), ShoveCamBehindUnit(), ShoveCamBelowUnit(), and GameBuilding::UpdatePhysics2().
const std::string & Unit::getAttackPreference | ( | ) | const |
Definition at line 8685 of file unit_generic.cpp.
References ROLES::getRole().
Definition at line 2024 of file unit_generic.cpp.
Referenced by AssignTBin(), Orders::TurretAI::Execute(), Orders::FaceTargetITTS::Execute(), UnitWrapper::getAverageGunSpeed(), UnitUtil::getPhysicsPriority(), Cockpit::updateAttackers(), and Missile::UpdatePhysics2().
Definition at line 8318 of file unit_generic.cpp.
Referenced by NetServer::addUnitCargoSnapshot(), Arrested(), basecargoassets(), BuyCargo(), buyShip(), BaseComputer::BuyUpgradeOperation::concludeTransaction(), BaseComputer::configureUpgradeCommitControls(), UnitUtil::decrementCargo(), eliminateZeroCargo(), Enslave(), FireKeyboard::Execute(), UnitUtil::GetCargo(), GetCargo(), UnitUtil::GetCargoIndex(), GetMasterPartList(), UniverseUtil::getRandCargo(), UnitUtil::hasCargo(), ImportPartList(), UnitUtil::incrementCargo(), InList(), BaseComputer::loadMasterList(), makeBlankUpgrade(), makeMasterPartList(), UnitUtil::RecomputeUnitUpgrades(), UnitUtil::removeCargo(), sellShip(), BaseComputer::BuyUpgradeOperation::start(), CommunicatingAI::UpdateContrabandSearch(), UpdateMasterPartList(), UpgradeAllowed(), and WriteUnitString().
Definition at line 8323 of file unit_generic.cpp.
Definition at line 8376 of file unit_generic.cpp.
References UnitUtil::GetCargo(), and GetCargo().
Definition at line 8384 of file unit_generic.cpp.
References Cargo::content, Hashtable< KEY, VALUE, SIZ >::Delete(), Hashtable< KEY, VALUE, SIZ >::Get(), UnitFactory::getMasterPartList(), int, and Hashtable< KEY, VALUE, SIZ >::Put().
float Unit::getCargoVolume | ( | void | ) | const |
Definition at line 8295 of file unit_generic.cpp.
References cargoIsUpgrade().
Referenced by BaseComputer::maxQuantityForPlayer(), and BaseComputer::recalcTitle().
const std::string & Unit::getCockpit | ( | ) | const |
Definition at line 1809 of file unit_generic.cpp.
Referenced by CockpitKeys::Inside(), and SwitchUnits2().
csOPCODECollider * Unit::getCollideTree | ( | const Vector & | scale = Vector( 1, 1, 1 ) , |
const std::vector< struct mesh_polygon > * | = NULL |
||
) |
Definition at line 2045 of file unit_xml.cpp.
References j, meshdata, and nummesh().
Referenced by collideTrees::colTree(), and LoadRow().
const std::string & Unit::getCombatRole | ( | ) | const |
Definition at line 8698 of file unit_generic.cpp.
References ROLES::getRole().
Unit::Computer & Unit::GetComputerData | ( | ) |
Definition at line 138 of file unit_generic.cpp.
Referenced by FlyByWire::Accel(), Radar::CollectRadarTracks::acquire(), FlyByWire::Afterburn(), BarrelRoll(), ZoneMgr::broadcastSnapshots(), CheckAccessory(), ChooseNavPoint(), FlyByKeyboard::clamp_axis(), DistanceWarrantsTravelTo(), DistanceWarrantsWarpTo(), DockedScript(), VDU::Draw(), EvadeWavy(), FlyByJoystick::Execute(), Orders::AggressiveAI::Execute(), Orders::MoveToParent::Execute(), Orders::ChangeHeading::Execute(), Orders::AutoLongHaul::Execute(), FireKeyboard::Execute(), FlyByWire::Execute(), Radar::Sensor::GetLockCone(), Radar::Sensor::GetMaxCone(), Radar::Sensor::GetMaxRange(), CommunicatingAI::GetRandomUnit(), GameCockpit::LookupUnitStat(), FlyByWire::MatchSpeed(), Mount::PhysicsAlignedFire(), Orders::AggressiveAI::ProcessLogicItem(), CommunicatingAI::RandomInitiateCommunication(), FlyByKeyboard::reduce_axis(), FlyByWire::Right(), RollLeft(), RollLeftHard(), FlyByWire::RollRight(), RollRight(), RollRightHard(), ShipCommands::setkps(), UnitUtil::setSpeed(), Orders::FireAt::ShouldFire(), FlyByWire::Stop(), FlyByWire::ThrustFront(), FlyByWire::ThrustRight(), FlyByWire::ThrustUp(), TryDock(), FlyByWire::Up(), Radar::Sensor::UseFriendFoe(), useJitteryAutopilot(), Radar::Sensor::UseObjectRecognition(), and Radar::Sensor::UseThreatAssessment().
const std::vector< std::string > & Unit::GetDestinations | ( | ) | const |
Definition at line 1610 of file unit_generic.cpp.
Referenced by StarSystem::Statistics::AddUnit(), Orders::AggressiveAI::AfterburnerJumpTurnTowards(), Bolt::Collide(), Beam::Collide(), CompareDest(), cosAngleTo(), createObjects(), Orders::Ikarus::Execute(), Orders::AggressiveAI::Execute(), Orders::AggressiveAI::ExecuteNoEnemies(), isJumppoint(), jumpReactToCollision(), StarSystem::Statistics::RemoveUnit(), Target(), and Cockpit::Update().
float Unit::GetElasticity | ( | ) |
Definition at line 1867 of file unit_generic.cpp.
float Unit::getEmptyCargoVolume | ( | void | ) | const |
Definition at line 8285 of file unit_generic.cpp.
Referenced by BaseComputer::maxQuantityForPlayer(), BaseComputer::recalcTitle(), and showUnitStats().
float Unit::getEmptyUpgradeVolume | ( | void | ) | const |
Definition at line 8290 of file unit_generic.cpp.
Referenced by BaseComputer::recalcTitle(), and showUnitStats().
const string Unit::getFgID | ( | ) |
|
inline |
Definition at line 1468 of file unit_generic.h.
References flightgroup_subnumber.
Referenced by UnitFactory::addAsteroidBuffer(), UnitFactory::addNebulaBuffer(), UnitFactory::addUnitBuffer(), Mission::DirectorShipDestroyed(), displayUnitInfo(), DoSpeech(), ExecuteAI(), UnitUtil::getFgSubnumber(), getUnitNameAndFgNoBase(), Cockpit::MakeBaseName(), MakeUnitXMLPretty(), Orders::AggressiveAI::ProcessCurrentFgDirective(), and Orders::AggressiveAI::ReCommandWing().
|
inline |
Definition at line 1507 of file unit_generic.h.
Referenced by UnitFactory::addAsteroidBuffer(), UnitFactory::addMissileBuffer(), UnitFactory::addNebulaBuffer(), and UnitFactory::addUnitBuffer().
|
inline |
Definition at line 1463 of file unit_generic.h.
References flightgroup.
Referenced by UnitFactory::addAsteroidBuffer(), NetClient::AddClientObject(), UnitFactory::addNebulaBuffer(), UnitFactory::addUnitBuffer(), CommunicatingAI::AdjustRelationTo(), AllUnitsCloseAndEngage(), Arrested(), AutoPilotToErrorMessage(), buyShip(), Mission::DirectorShipDestroyed(), displayUnitInfo(), Pilot::DoHit(), DoSpeech(), Orders::Ikarus::Execute(), Orders::AggressiveAI::Execute(), Pilot::getAnger(), getAutoRSize(), UnitUtil::getFgDirectiveCR(), UnitUtil::getFlightgroupLeader(), UnitUtil::getFlightgroupNameCR(), getUnitNameAndFgNoBase(), InRange(), FireKeyboard::JoinFg(), LeadMe(), LoadRow(), Cockpit::MakeBaseName(), MakeUnitXMLPretty(), Mount::PhysicsAlignedFire(), Order::ProcessCommunicationMessages(), Orders::AggressiveAI::ProcessCurrentFgDirective(), UnitUtil::setFgDirective(), UnitUtil::setFlightgroupLeader(), Orders::FormUp::SetParent(), Cockpit::SetParent(), Orders::FaceDirection::SetParent(), UnitUtil::switchFg(), GameUnit< UnitType >::TransferUnitToSystem(), and WARPENERGYMULTIPLIER().
string Unit::getFullAIDescription | ( | ) |
Definition at line 2016 of file unit_generic.cpp.
Referenced by AImissionScript::~AImissionScript().
|
inline |
Definition at line 1502 of file unit_generic.h.
References fullname.
Referenced by NetClient::AddClientObject(), UnitFactory::addMissileBuffer(), NetClient::AddObjects(), buildCargoDescription(), BaseComputer::constructControls(), displayUnitInfo(), DockToSavedBases(), DoSpeech(), Orders::AggressiveAI::ExecuteNoEnemies(), Planet::getCargoUnitName(), getUnitNameAndFgNoBase(), Cockpit::MakeBaseName(), MakeUnitXMLPretty(), showUnitStats(), and GameUnit< UnitType >::UpgradeInterface().
float Unit::getHiddenCargoVolume | ( | void | ) | const |
Definition at line 8260 of file unit_generic.cpp.
Referenced by CommunicatingAI::UpdateContrabandSearch().
|
inlinevirtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 541 of file unit_generic.h.
Referenced by buildShipDescription(), and DrawShield().
|
inline |
Definition at line 1194 of file unit_generic.h.
References hull.
Referenced by GameCockpit::Draw(), Orders::FireAt::Execute(), FireKeyboard::Execute(), UniverseUtil::getUnit(), UnitWrapper::isNull(), GameCockpit::LookupUnitStat(), Music::Music(), UnitUtil::PercentOperational(), Priority(), FireKeyboard::ProcessCommMessage(), ZoneMgr::removeClient(), Cockpit::SetParent(), showUnitStats(), SuicideKey(), and WriteSaveGame().
|
inline |
Definition at line 1198 of file unit_generic.h.
Referenced by GamePlanet::AddFog(), DrawShield(), Orders::AggressiveAI::ProcessLogicItem(), Orders::AggressiveAI::SetParent(), and showUnitStats().
UnitImages< void > & Unit::GetImageInformation | ( | ) |
Definition at line 8313 of file unit_generic.cpp.
Referenced by dockingdistance(), GameCockpit::Draw(), GameUnit< UnitType >::Explode(), Planet::InitPlanet(), GameCockpit::LookupUnitStat(), makeMasterPartList(), UnitUtil::setECM(), SuperDock(), and UpdateMasterPartList().
|
inline |
Definition at line 705 of file unit_generic.h.
References jump.
Referenced by ChooseNavPoint(), DealPossibleJumpDamage(), GameStarSystem::DoJumpingLeaveSightAndSound(), GameStarSystem::DrawJumpStars(), Orders::Ikarus::Execute(), Orders::AggressiveAI::Execute(), FlyByKeyboard::Execute(), UnitWrapper::GetJumpStatus(), jumpReactToCollision(), StarSystem::JumpTo(), GameCockpit::LookupUnitStat(), GamePlanet::reactToCollision(), showUnitStats(), and TurnJumpOKLightOn().
std::string Unit::GetManifest | ( | unsigned int | i, |
Unit * | scanningUnit, | ||
const Vector & | original_velocity | ||
) | const |
FIXME somehow mangle string
Definition at line 8432 of file unit_generic.cpp.
References VegaConfig::getVariable(), XMLSupport::parse_float(), and vs_config.
Referenced by CommunicatingAI::UpdateContrabandSearch().
|
inline |
Definition at line 1117 of file unit_generic.h.
Referenced by ContinuousTerrain::Collide(), Beam::Collide(), Orders::MoveToParent::Execute(), Orders::ChangeHeading::Execute(), Orders::AutoLongHaul::Execute(), Orders::AggressiveAI::ExecuteNoEnemies(), Priority(), Orders::AggressiveAI::ProcessLogicItem(), reactToCollision(), showUnitStats(), GameUnit< UnitType >::Split(), and GameBuilding::UpdatePhysics2().
Definition at line 222 of file unit_generic.cpp.
References Unit::Limits::forward, Unit::Limits::lateral, q, Unit::Limits::retro, Vector, and Unit::Limits::vertical.
double Unit::getMinDis | ( | const QVector & | pnt) |
Definition at line 5622 of file unit_generic.cpp.
References e, getMinDis(), Transform(), and Vector.
Referenced by getMinDis(), and ClickList::requestShip().
|
inline |
Definition at line 1113 of file unit_generic.h.
References fuel, and Momentofinertia.
Referenced by Orders::MatchAngularVelocity::Execute(), Orders::ChangeHeading::Execute(), showUnitStats(), and GameUnit< UnitType >::Split().
|
inline |
Definition at line 488 of file unit_generic.h.
References nebula.
Referenced by Radar::Sensor::InsideNebula().
Vector Unit::GetNetAcceleration | ( | ) |
Definition at line 212 of file unit_generic.cpp.
References identity_matrix(), InvTransformNormal(), q, and Vector.
|
inline |
Definition at line 393 of file unit_generic.h.
References mounts.
Referenced by AddMounts(), computeLockingPercent(), DealDamageToHullReturnArmor(), Orders::TurretAI::Execute(), FireKeyboard::Execute(), FilterDowngradeList(), Radar::Track::HasWeapons(), mountSerializer(), UnitUtil::PercentOperational(), RemoveFromSystem(), Repair(), RepairUpgradeCargo(), BaseComputer::BuyUpgradeOperation::selectMount(), BaseComputer::SellUpgradeOperation::selectMount(), showUnitStats(), and UpgradeMounts().
Definition at line 203 of file unit_generic.cpp.
References Matrix::getP(), Matrix::getQ(), and Matrix::getR().
Referenced by GameCockpit::Autopilot(), GameStarSystem::DoJumpingComeSightAndSound(), GameStarSystem::DoJumpingLeaveSightAndSound(), GameStarSystem::DrawJumpStars(), Orders::AggressiveAI::Execute(), Orders::ChangeHeading::Execute(), FaceTarget(), UnitWrapper::GetOrientation(), Orders::AggressiveAI::ProcessLogicItem(), GamePlanet::reactToCollision(), GameCockpit::SetupViewPort(), and GameBuilding::UpdatePhysics2().
Definition at line 2031 of file unit_generic.cpp.
Referenced by Arrested(), AutoPilotToErrorMessage(), DoSpeech(), drawlistitem(), Orders::TurretAI::Execute(), FlyByKeyboard::Execute(), FireKeyboard::Execute(), ExecuteRequestClearenceKey(), GameUnit< UnitType >::Explode(), GenerateAutoError(), getAutoRSize(), Radar::Track::GetRelation(), GetThreat(), isEnemy(), isFriend(), isNeutral(), Mount::PhysicsAlignedFire(), Order::ProcessCommunicationMessages(), Orders::FireAt::PursueTarget(), CommunicatingAI::RandomInitiateCommunication(), SwitchUnits(), TargNear(), TryDock(), and Cockpit::Update().
|
inline |
Definition at line 305 of file unit_generic.h.
References serial.
Referenced by UnitFactory::addAsteroidBuffer(), NetClient::AddClientObject(), UnitUtil::addCredits(), UnitFactory::addMissileBuffer(), UnitFactory::addNebulaBuffer(), NetClient::AddObjects(), UnitFactory::addPlanetBuffer(), ZoneMgr::addPosition(), UnitFactory::addUnitBuffer(), NetServer::addUnitCargoSnapshot(), ZoneMgr::broadcast(), ZoneMgr::broadcastDamage(), ZoneMgr::broadcastNoSelf(), ZoneMgr::broadcastSample(), ZoneMgr::broadcastSnapshots(), ZoneMgr::broadcastText(), BaseInterface::Room::Launch::Click(), ClientState::ClientState(), Order::Communicate(), CrashForceDock(), displayUnitInfo(), getNetworkUnit(), ZoneMgr::getUnit(), ZoneMgr::getZoneBuffer(), NetClient::Interpolate(), StarSystem::JumpTo(), NetClient::logout(), NetServer::saveAccount(), NetClient::scanRequest(), NetClient::send(), NetClient::sendAlive(), NetServer::sendCargoSnapshot(), NetServer::sendCommunication(), NetServer::sendCustom(), NetServer::sendForcePosition(), NetServer::sendJump(), NetServer::sendMessage(), NetServer::sendMission(), NetClient::sendPosition(), NetServer::sendSaveData(), Target(), and NetClient::targetRequest().
void Unit::GetSortedCargoCat | ( | const std::string & | category, |
size_t & | catbegin, | ||
size_t & | catend | ||
) |
Definition at line 8349 of file unit_generic.cpp.
References Cargo::category, BaseUtil::Comp(), and Cargo::content.
Referenced by UniverseUtil::getRandCargo().
StarSystem * Unit::getStarSystem | ( | ) |
Definition at line 1389 of file unit_generic.cpp.
References _Universe, Universe::activeStarSystem(), Cockpit::activeStarSystem, and Universe::isPlayerStarship().
Referenced by ZoneMgr::broadcast(), CollideAll(), compute_light_dot(), DockToSavedBases(), UnitUtil::getUnitSystemFile(), UnitUtil::JumpTo(), NetServer::sendNewUnitQueue(), starSystemOK(), and Target().
const StarSystem * Unit::getStarSystem | ( | ) | const |
Definition at line 1402 of file unit_generic.cpp.
References _Universe, Universe::activeStarSystem(), Cockpit::activeStarSystem, and Universe::isPlayerStarship().
un_iter Unit::getSubUnits | ( | ) |
Contains information about a particular Mount on a unit. And the weapons it has, where it is, where it's aimed, The ammo and the weapon type. As well as the possible weapons it may fit Warning: type has a string inside... cannot be memcpy'd
Definition at line 1833 of file unit_generic.cpp.
Referenced by ActivateAnimation(), AssignTBin(), CanFaceTarget(), ChooseSubTargets(), Orders::FireAt::ChooseTargets(), disableSubUnits(), Orders::TurretAI::Execute(), GetFinalTurret(), UnitWrapper::getSubUnits(), BaseComputer::UpgradeOperation::gotSelectedMount(), Asteroid::Init(), InsideCollideTree(), RecursiveSetSchedule(), SetSubunitRotation(), BaseComputer::UpgradeOperation::showTurretPicker(), showUnitStats(), subunitSerializer(), WeaponComparator< FORWARD >::ToggleWeaponSet(), TurretFAW(), Cockpit::Update(), Missile::UpdatePhysics2(), WriteUnit(), and WriteUnitString().
enum Unit::tractorHow Unit::getTractorability | ( | ) | const |
Definition at line 8932 of file unit_generic.cpp.
References _Universe, VegaConfig::getVariable(), Universe::isPlayerStarship(), and vs_config.
|
inline |
Definition at line 942 of file unit_generic.h.
References cumulative_transformation_matrix.
Referenced by CanDockWithMe(), ContinuousTerrain::Collide(), DrawDockingBoxes(), Orders::AutoDocking::EnqueuePort(), Orders::TurretAI::Execute(), Orders::FormUp::Execute(), Orders::FormUpToOwner::Execute(), Orders::FaceDirection::Execute(), anonymous_namespace{autodocking.cpp}::FindDockingPort(), Orders::DockingOps::Movement(), and SelectDockPort().
const std::string & Unit::getUnitRole | ( | ) | const |
Definition at line 8680 of file unit_generic.cpp.
References ROLES::getRole().
float Unit::getUpgradeVolume | ( | void | ) | const |
Definition at line 8304 of file unit_generic.cpp.
References cargoIsUpgrade().
Referenced by BaseComputer::recalcTitle().
|
inline |
Definition at line 1106 of file unit_generic.h.
References cumulative_velocity.
Referenced by ActuallyWarpTo(), CarSimUpdate(), CoastToStop(), ContinuousTerrain::Collide(), Beam::Collide(), collideTrees::colTree(), DealPossibleJumpDamage(), GameStarSystem::DoJumpingLeaveSightAndSound(), DoNothing(), Orders::AggressiveAI::Execute(), Orders::MoveToParent::Execute(), FlyByKeyboard::Execute(), Orders::LoopAround::Execute(), Orders::LoopAroundAgro::Execute(), Orders::AggressiveAI::ExecuteNoEnemies(), UnitUtil::getPhysicsPriority(), CommunicatingAI::InitiateContrabandSearch(), KickstopBase(), Mount::PhysicsAlignedFire(), Priority(), Orders::AggressiveAI::ProcessLogicItem(), reactToCollision(), SetupVAndTargetV(), GameCockpit::SetupViewPort(), GameUnit< UnitType >::Thrust(), CommunicatingAI::UpdateContrabandSearch(), GameMissile::UpdatePhysics2(), Missile::UpdatePhysics2(), and WarpToP().
Definition at line 3176 of file unit_generic.cpp.
References _Universe, game_data_t::difficulty, UniverseUtil::exp(), g_game, VegaConfig::getVariable(), Universe::isPlayerStarship(), XMLSupport::parse_float(), and vs_config.
Referenced by DistanceWarrantsTravelTo(), DistanceWarrantsWarpTo(), and UnitWrapper::GetVelocityDifficultyMult().
|
inline |
Definition at line 922 of file unit_generic.h.
References warpenergy.
Referenced by GameCockpit::LookupUnitStat(), showUnitStats(), and TurnJumpOKLightOn().
Vector Unit::GetWarpVelocity | ( | ) | const |
Definition at line 169 of file unit_generic.cpp.
References cumulative_velocity, speed, and Vector.
Referenced by DistanceWarrantsWarpTo(), Radar::SphereDisplay::DrawBackground(), InsideCollideTree(), GameCockpit::LookupUnitStat(), rayCollide(), ShoveCamBehindUnit(), ShoveCamBelowUnit(), and WarpMatrixForCollisions().
bool Unit::hasPendingClearanceRequests | ( | ) | const |
Definition at line 5983 of file unit_generic.cpp.
Referenced by UnitUtil::hasDockingUnits().
|
inlinevirtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 1015 of file unit_generic.h.
void Unit::ImportPartList | ( | const std::string & | category, |
float | price, | ||
float | pricedev, | ||
float | quantity, | ||
float | quantdev | ||
) |
Definition at line 8525 of file unit_generic.cpp.
References c, Cargo::category, float, float_to_int(), UnitUtil::GetCargo(), GetCargo(), GetUnitMasterPartList(), VegaConfig::getVariable(), j, numCargo(), XMLSupport::parse_float(), Cargo::price, Cargo::quantity, and vs_config.
Referenced by ImportCargo().
bool Unit::InCorrectStarSystem | ( | StarSystem * | active) |
Definition at line 126 of file unit_generic.cpp.
Referenced by Orders::AggressiveAI::ProcessCurrentFgDirective().
Definition at line 3100 of file unit_generic.cpp.
References VegaConfig::getVariable(), XMLSupport::parse_bool(), and vs_config.
Referenced by ForceDock().
void Unit::Init | ( | ) |
Definition at line 965 of file unit_generic.cpp.
References activeStarSystem, Unit::Limits::afterburn, afterburnenergy, aistate, AngularVelocity, UnitSounds::armor, armor, attack_preference, autopilotactive, Armor::backlefttop, Armor::backrighttop, Unit::Computer::RADARLIM::capability, capship_size, UnitImages< BOGUS >::CargoVolume, UnitSounds::cloak, UnitImages< BOGUS >::cloakenergy, UnitImages< BOGUS >::cloakglass, cloaking, cloakmin, UnitImages< BOGUS >::cloakrate, UnitImages< BOGUS >::cockpit_damage, colTrees, Unit::Computer::combat_mode, UnitImages< BOGUS >::CommFunctionality, UnitImages< BOGUS >::CommFunctionalityMax, computer, corner_max, corner_min, cumulative_transformation, cumulative_transformation_matrix, cumulative_velocity, cur_sim_queue_slot, curr_physical_state, Unit::UnitJump::damage, damages, DEFAULTVIS, Unit::UnitJump::delay, do_subunit_scheduling, docked, Unit::UnitJump::drive, UnitImages< BOGUS >::ecm, Unit::Computer::ecmactive, Shield::efficiency, Unit::UnitJump::energy, energy, UnitSounds::engine, UnitImages< BOGUS >::equipment_volume, UnitSounds::explode, Unit::graphic_options::FaceCamera, UnitImages< BOGUS >::fireControlFunctionality, UnitImages< BOGUS >::fireControlFunctionalityMax, flightgroup, flightgroup_subnumber, float, UnitImages< BOGUS >::forcejump, Unit::Limits::forward, Armor::frontlefttop, Armor::frontrightbottom, Armor::frontrighttop, fuel, ROLES::getRole(), VegaConfig::getVariable(), graphicOptions, HeatSink, UnitImages< BOGUS >::HiddenCargoVolume, UnitSounds::hull, hull, Identity(), identity_transformation(), Unit::Computer::RADARLIM::Capability::IFF_NONE, inertialmode, Unit::UnitJump::insysenergy, invisible, Unit::Computer::itts, UnitSounds::jump, jump, killed, last_processed_sqs, Unit::Limits::lateral, Shield::leak, UnitImages< BOGUS >::LifeSupportFunctionality, UnitImages< BOGUS >::LifeSupportFunctionalityMax, Unit::Limits::limitmin, limits, location, Unit::Computer::RADARLIM::lockcone, Unit::Computer::RADARLIM::locked, Mass, Unit::Computer::max_combat_ab_speed, Unit::Computer::max_combat_speed, Unit::Computer::max_pitch_down, Unit::Computer::max_pitch_up, Unit::Computer::max_roll_left, Unit::Computer::max_roll_right, Unit::Computer::max_yaw_left, Unit::Computer::max_yaw_right, Unit::Computer::RADARLIM::maxcone, maxenergy, maxhull, Unit::Computer::RADARLIM::maxrange, MAXVDUS, maxwarpenergy, Unit::Computer::RADARLIM::mintargetsize, Momentofinertia, Unit::Computer::NavPoint, nebula, NetForce, NetLocalForce, NetLocalTorque, NetTorque, Network, networked, UnitImages< BOGUS >::next_repair_cargo, UnitImages< BOGUS >::next_repair_time, NO_DAMAGE, NOT_DOCKED, NUM_COLLIDE_MAPS, Shield::number, owner, XMLSupport::parse_float(), UnitImages< BOGUS >::pExplosion, UnitImages< BOGUS >::pHudImage, pImage, Unit::Limits::pitch, predicted_priority, prev_physical_state, Unit::Computer::radar, Shield::recharge, recharge, Unit::graphic_options::RecurseIntoSubUnitsOnCollision, UnitImages< BOGUS >::repair_droid, resolveforces, Unit::Limits::retro, Unit::Limits::roll, schedule_priority, scheduleDefault, selected, set_null(), Unit::Computer::set_speed, UnitContainer::SetUnit(), UnitSounds::shield, shield, Shield::shield2fb, shieldtight, sim_atom_multiplier, SIM_QUEUE_SIZE, Unit::Computer::slide_end, Unit::Computer::slide_start, sound, UnitImages< BOGUS >::SPECDriveFunctionality, UnitImages< BOGUS >::SPECDriveFunctionalityMax, specInterdiction, Unit::Limits::structurelimits, Unit::graphic_options::SubUnit, Unit::Computer::threat, Unit::Computer::threatlevel, UnitImages< BOGUS >::timeexplode, Unit::Computer::RADARLIM::trackingactive, Unit::Computer::RADARLIM::trackingcone, turretstatus, ucref, UncheckUnit(), unit_role, UnitImages< BOGUS >::unitwriter, UnitImages< BOGUS >::UpgradeVolume, Vector, Velocity, VelocityReference(), Unit::Limits::vertical, vs_config, Unit::UnitJump::warpDriveRating, warpenergy, Unit::graphic_options::WarpFieldStrength, xml, and Unit::Limits::yaw.
Referenced by Asteroid::Asteroid(), GameAsteroid::GameAsteroid(), GameUnit< UnitType >::GameUnit(), Planet::InitPlanet(), and Unit().
void Unit::Init | ( | const char * | filename, |
bool | SubUnit, | ||
int | faction, | ||
std::string | customizedUnit = std::string("") , |
||
Flightgroup * | flightgroup = NULL , |
||
int | fg_subnumber = 0 , |
||
std::string * | netxml = NULL |
||
) |
Definition at line 1220 of file unit_generic.h.
Referenced by Radar::CollectRadarTracks::acquire(), ZoneMgr::broadcastSnapshots(), NavigationSystem::DrawSystem(), FireKeyboard::Execute(), getNearestTargetUnit(), Nearby(), Orders::AggressiveAI::ProcessCurrentFgDirective(), NetClient::sendPosition(), TargAll(), TargMissile(), TargSig(), and TargUn().
Definition at line 245 of file unit_generic.cpp.
References capship_size, CloakVisible(), getFlightgroup(), isUnit(), Magnitude(), Flightgroup::name, PLANETPTR, Position(), QVector, rSize(), and Vector.
Definition at line 138 of file unit_collide.cpp.
References isPlanet(), Position(), and querySphere().
Referenced by Collide(), and GameNebula::UpdatePhysics2().
bool Unit::InsideCollideTree | ( | Unit * | smaller, |
QVector & | bigpos, | ||
Vector & | bigNormal, | ||
QVector & | smallpos, | ||
Vector & | smallNormal, | ||
bool | bigasteroid = false , |
||
bool | smallasteroid = false |
||
) |
Definition at line 150 of file unit_collide.cpp.
References a1, csCollisionPair::a1, csCollisionPair::a2, ASTEROIDPTR, csCollisionPair::b1, csCollisionPair::b2, csCollisionPair::c1, csCollisionPair::c2, csOPCODECollider::Collide(), collideTrees::colTree(), colTrees, csVector3::Cross(), cumulative_transformation_matrix, UnitCollection::empty(), csOPCODECollider::GetCollisionPairCount(), csOPCODECollider::GetCollisions(), getSubUnits(), VegaConfig::getVariable(), GetWarpVelocity(), graphicOptions, hull, i, InsideCollideTree(), isUnit(), Magnitude(), csVector3::Normalize(), Matrix::p, XMLSupport::parse_float(), Position(), Unit::graphic_options::RecurseIntoSubUnitsOnCollision, csOPCODECollider::ResetCollisionPairs(), rSize(), csTransform::SetO2TTranslation(), SubUnits, Transform(), TransformNormal(), collideTrees::usingColTree(), vs_config, csVector3::x, Opcode::Point::x, csVector3::y, Opcode::Point::y, csVector3::z, and Opcode::Point::z.
Referenced by Collide(), UnitWrapper::InsideCollideTree(), and InsideCollideTree().
bool Unit::IsBase | ( | ) | const |
Definition at line 7890 of file unit_generic.cpp.
Referenced by Radar::Track::IdentifyType(), and Orders::AggressiveAI::ProcessCurrentFgDirective().
Definition at line 5978 of file unit_generic.cpp.
Referenced by Orders::AutoDocking::CanDock(), DrawDockingBoxes(), and Cockpit::Update().
Definition at line 5988 of file unit_generic.cpp.
References docked.
Referenced by Collide(), DockToSavedBases(), UnDockNow(), and Cockpit::Update().
Definition at line 1540 of file unit_generic.h.
References getRelation().
Referenced by getNearestTargetUnit().
|
inline |
Definition at line 890 of file unit_generic.h.
References pImage, and UnitImages< BOGUS >::timeexplode.
Referenced by Radar::Track::IsExploding().
Definition at line 1544 of file unit_generic.h.
References getRelation().
|
inline |
Definition at line 1534 of file unit_generic.h.
References GetDestinations().
Referenced by StarSystem::Statistics::AddUnit(), StarSystem::AddUnit(), Arrested(), UnitUtil::getPhysicsPriority(), Radar::Track::IdentifyType(), UnitUtil::isDockableUnit(), and UnitUtil::isSun().
Definition at line 1548 of file unit_generic.h.
References getRelation().
|
inline |
Definition at line 1530 of file unit_generic.h.
References isUnit(), and PLANETPTR.
Referenced by Radar::CollectRadarTracks::acquire(), StarSystem::Statistics::AddUnit(), StarSystem::AddUnit(), compute_light_dot(), GameCockpit::DoAutoLanding(), anonymous_namespace{autodocking.cpp}::FindDockingPort(), GenerateAutoError(), UnitUtil::getSignificantDistance(), Inside(), UnitUtil::isDockableUnit(), UnitUtil::isSun(), querySphere(), and useJitteryAutopilot().
|
inline |
|
inline |
Definition at line 375 of file unit_generic.h.
References graphicOptions, and Unit::graphic_options::SubUnit.
Referenced by UnitFactory::addNebulaBuffer(), AddSubUnits(), UnitFactory::addUnitBuffer(), Collidable::Collidable(), CollideAll(), FireKeyboard::DockKey(), GameStarSystem::Draw(), UnitDrawer::draw(), UnitDrawer::drawParents(), Orders::ChangeHeading::Execute(), Orders::FaceTarget::Execute(), Orders::AutoLongHaul::Execute(), FireKeyboard::Execute(), UniverseUtil::getUnitByPtr(), isNotTurretOwner(), FlyByKeyboard::JumpKey(), Mount::PhysicsAlignedFire(), RealPosition(), TargIncomingMissile(), FireKeyboard::UnDockKey(), and UpdateCollideQueue().
bool Unit::isTractorable | ( | enum tractorHow | how = tractorBoth ) | const |
Definition at line 8918 of file unit_generic.cpp.
Referenced by Beam::Collide(), and WriteUnitString().
|
inlinevirtual |
Reimplemented in Planet, Missile, Building, Nebula, Asteroid, and Enhancement.
Definition at line 1513 of file unit_generic.h.
References UNITPTR.
Referenced by UnitFactory::addBuffer(), StarSystem::AddUnit(), Planet::PlanetIterator::advance(), MissileEffect::ApplyDamage(), ApplyDamage(), AutoPilotToErrorMessage(), ZoneMgr::broadcastDamage(), ZoneMgr::broadcastSnapshots(), buildCargoDescription(), CloseEnoughToNavOrDest(), Bolt::Collide(), Terrain::Collide(), ContinuousTerrain::Collide(), Beam::Collide(), Collide(), compute_light_dot(), createObjects(), DistanceTwoTargets(), DockToSavedBases(), Orders::DockingOps::DockToTarget(), DoSpeech(), Orders::AggressiveAI::ExecuteNoEnemies(), getAtmospheric(), getAutoRSize(), UnitUtil::getPhysicsPriority(), getUnitNameAndFgNoBase(), ZoneMgr::getZoneBuffer(), Radar::Track::IdentifyType(), InRange(), InsideCollideTree(), UnitUtil::isAsteroid(), UnitUtil::isCloseEnoughToDock(), UnitUtil::isDockableUnit(), Orders::FireAt::isJumpablePlanet(), isPlanet(), UnitUtil::isSignificant(), isStarShip(), BaseInterface::Load(), UnitUtil::orbit(), Orders::DockingOps::PerformDockingOperations(), querySphereNoRecurse(), Asteroid::reactToCollision(), Enhancement::reactToCollision(), GamePlanet::reactToCollision(), Missile::reactToCollision(), reactToCollision(), BaseComputer::recalcTitle(), RequestClearence(), UniverseUtil::SafeStarSystemEntrancePoint(), ScoreKill(), Orders::FireAt::ShouldFire(), TargMissile(), TargNear(), TargSig(), TargThreat(), TargUn(), GameUnit< UnitType >::TransferUnitToSystem(), Atmosphere::Update(), Cockpit::Update(), UpdatePhysics(), and GameUnit< UnitType >::UpgradeInterface().
Definition at line 3112 of file unit_generic.cpp.
References _Universe, Universe::activeStarSystem(), DeactivateJumpDrive(), Unit::UnitJump::drive, Unit::UnitJump::energy, UnitImages< BOGUS >::forcejump, GetDestinations(), GetJumpStatus(), VegaConfig::getVariable(), graphicOptions, Unit::graphic_options::InWarp, Universe::isPlayerStarship(), StarSystem::JumpTo(), XMLSupport::parse_bool(), pImage, NetServer::sendJump(), SERVER, size, TurnJumpOKLightOn(), vs_config, VSServer, and warpenergy.
|
inline |
Definition at line 16 of file unit.h.
References killed, and zapped.
Referenced by BaseComputer::actionConfirmedLoadGame(), buyShip(), BaseInterface::Room::Eject::Click(), Beam::Collide(), EjectCargo(), NetActionConfirm::finalizeJoinGame(), Planet::InitPlanet(), Iteration(), Missile::Kill(), UnitWrapper::Kill(), Planet::Kill(), Kill(), KillDuplicateUnits(), UniverseUtil::loadGame(), main(), Enhancement::reactToCollision(), ZoneMgr::removeClient(), Briefing::Ship::Ship(), Cockpit::Update(), UpgradeSubUnitsWithFactory(), and StarSystem::~StarSystem().
Definition at line 4557 of file unit_generic.cpp.
References _Universe, AUDDeleteSound(), AUDStopPlaying(), float_to_int(), VegaConfig::getVariable(), UnitUtil::isPlayerStarship(), Kill(), MISSILEPTR, Universe::netLock(), Network, XMLSupport::parse_float(), NetServer::sendKill(), SERVER, Unitdeletequeue, vs_config, VSFileSystem::vs_dprintf(), and VSServer.
|
inline |
Definition at line 22 of file unit.h.
References killed, and zapped.
Referenced by UnitCollection::contains(), and UnitContainer::SetUnit().
|
inline |
void Unit::LateralThrust | ( | float | amt) |
Definition at line 4650 of file unit_generic.cpp.
void Unit::LightShields | ( | const Vector & | pnt, |
const Vector & | normal, | ||
float | amt, | ||
const GFXColor & | color | ||
) |
Definition at line 4070 of file unit_generic.cpp.
References mymax(), mymin, and Vector.
|
inline |
Definition at line 1124 of file unit_generic.h.
References limits.
Referenced by FlyByWire::Afterburn(), CanFaceTarget(), FlyByWire::DirectThrustFront(), FlyByWire::DirectThrustRight(), FlyByWire::DirectThrustUp(), Orders::MoveToParent::Execute(), Orders::ChangeHeading::Execute(), FlyByWire::Execute(), and Orders::AggressiveAI::ProcessLogicItem().
void Unit::LoadAIScript | ( | const std::string & | aiscript) |
Definition at line 1877 of file unit_generic.cpp.
References Mission::addModule(), PythonClass< SuperClass >::Factory(), and mission.
Referenced by Mission::call_unit_launch(), createObjects(), and LoadMission().
bool Unit::LoadLastPythonAIScript | ( | ) |
Definition at line 1908 of file unit_generic.cpp.
References PythonClass< SuperClass >::LastPythonClass().
void Unit::LoadRow | ( | class CSVRow & | row, |
std::string | unitMod, | ||
std::string * | netxml = NULL |
||
) |
Definition at line 704 of file unit_csv.cpp.
References AddCarg(), AddDocks(), AddLights(), AddMeshes(), AddMounts(), addRapidMesh(), addShieldMesh(), AddSounds(), AddSubUnits(), Unit::Limits::afterburn, afterburnenergy, afterburntype, Unit::graphic_options::Animating, armor, AssignIf(), AssignIfDeg(), Armor::backleftbottom, Armor::backlefttop, Armor::backrightbottom, Armor::backrighttop, cache_ani(), calculate_extent(), Unit::XML::calculated_role, Unit::Computer::RADARLIM::canlock, Unit::Computer::RADARLIM::capability, UnitImages< BOGUS >::CargoVolume, CheckAccessory(), UnitImages< BOGUS >::cloakenergy, UnitImages< BOGUS >::cloakglass, cloaking, cloakmin, UnitImages< BOGUS >::cloakrate, UnitImages< BOGUS >::cockpit_damage, UnitImages< BOGUS >::CockpitCenter, collideTreesMaxTrees, colTrees, UnitImages< BOGUS >::CommFunctionality, UnitImages< BOGUS >::CommFunctionalityMax, computer, corner_max, corner_min, UniverseUtil::cos(), createVSSprite(), csvRow, Unit::XML::damageiterator, Unit::XML::data, DEF_OPTIMIZER, Unit::UnitJump::delay, deleteVSSprite(), Dock(), Unit::UnitJump::drive, UnitImages< BOGUS >::ecm, Shield::efficiency, Unit::UnitJump::energy, energy, UnitImages< BOGUS >::equipment_volume, UnitImages< BOGUS >::explosion_type, Unit::graphic_options::FaceCamera, faction, UnitImages< BOGUS >::fireControlFunctionality, UnitImages< BOGUS >::fireControlFunctionalityMax, float, UnitImages< BOGUS >::forcejump, Unit::Limits::forward, Armor::frontleftbottom, Armor::frontlefttop, Armor::frontrightbottom, Armor::frontrighttop, fuel, fullname, collideTrees::Get(), getCollideTree(), FactionUtil::GetFaction(), getFlightgroup(), VSFileSystem::GetHashName(), CSVRow::getParent(), Mesh::GetPolys(), VegaConfig::getVariable(), graphicOptions, Unit::XML::hasColTree, HeatSink, UnitImages< BOGUS >::HiddenCargoVolume, HudDamage(), hull, i, Unit::Computer::RADARLIM::Capability::IFF_BUBBLE, Unit::Computer::RADARLIM::Capability::IFF_FRIEND_FOE, Unit::Computer::RADARLIM::Capability::IFF_NONE, Unit::Computer::RADARLIM::Capability::IFF_OBJECT_RECOGNITION, Unit::Computer::RADARLIM::Capability::IFF_PLANE, Unit::Computer::RADARLIM::Capability::IFF_SPHERE, Unit::Computer::RADARLIM::Capability::IFF_THREAT_ASSESSMENT, ImportCargo(), collideTrees::Inc(), INIT_OPTIMIZER, Unit::UnitJump::insysenergy, int, isVSSpriteLoaded(), UnitXML::ITTS, Unit::Computer::itts, jump, Unit::Limits::lateral, Shield::leak, UnitImages< BOGUS >::LifeSupportFunctionality, UnitImages< BOGUS >::LifeSupportFunctionalityMax, limits, LoadCockpit(), LOADROW_OPTIMIZER, Unit::Computer::RADARLIM::lockcone, Mass, Unit::Computer::max_combat_ab_speed, Unit::Computer::max_combat_speed, Unit::Computer::max_pitch_down, Unit::Computer::max_pitch_up, Unit::Computer::max_roll_left, Unit::Computer::max_roll_right, MAX_SHIELD_NUMBER, Unit::Computer::max_yaw_left, Unit::Computer::max_yaw_right, Unit::Computer::RADARLIM::maxcone, maxenergy, maxhull, Unit::Computer::RADARLIM::maxrange, MAXVDUS, maxwarpenergy, Unit::graphic_options::MaxWarpMultiplier, meshdata, Unit::XML::meshes, Unit::graphic_options::MinWarpMultiplier, Momentofinertia, Unit::graphic_options::NoDamageParticles, Unit::graphic_options::NumAnimationPoints, Shield::number, ONE, OPTIM_GET, CSVTable::optimizer_setup, XMLSupport::parse_bool(), XMLSupport::parse_float(), XMLSupport::parse_int(), UnitImages< BOGUS >::pHudImage, pImage, Unit::Limits::pitch, Unit::Computer::radar, Unit::XML::randomstartframe, Unit::XML::randomstartseconds, Shield::range, collideTrees::rapidColliders, Unit::XML::rapidmesh, Unit::XML::rapidmesh_str, Shield::recharge, recharge, Unit::graphic_options::RecurseIntoSubUnitsOnCollision, UnitImages< BOGUS >::repair_droid, Unit::Limits::retro, ShieldFacing::rhomax, ShieldFacing::rhomin, Unit::Limits::roll, rSize(), setAttackPreference(), setAverageGunSpeed(), setTractorability(), setUnitRole(), CSVTable::SetupOptimizer(), Shield::shield, shield, Shield::shield2fb, Shield::shield4fbrl, Shield::shield8, Unit::XML::shieldmesh, Unit::XML::shieldmesh_str, sizeof(), Unit::Computer::slide_end, Unit::Computer::slide_start, UnitImages< BOGUS >::SPECDriveFunctionality, UnitImages< BOGUS >::SPECDriveFunctionalityMax, specInterdiction, stob(), stof(), stoi(), ShieldFacing::thetamax, ShieldFacing::thetamin, XMLSupport::tostring(), Unit::Computer::RADARLIM::trackingcone, tractorImmune, tractorIn, tractorPush, two, Unit::XML::unitlevel, Unit::XML::unitModifications, UnitImages< BOGUS >::unitscale, Unit::XML::unitscale, UpgradeUnit(), UnitImages< BOGUS >::UpgradeVolume, Vector, Unit::Limits::vertical, vs_config, VS_PI, warpenergy, xml, and Unit::Limits::yaw.
void Unit::LoadXML | ( | const char * | filename, |
const char * | unitModifications = "" , |
||
std::string * | xmlbuffer = NULL |
||
) |
void Unit::LoadXML | ( | VSFileSystem::VSFile & | f, |
const char * | unitModifications = "" , |
||
std::string * | xmlbuffer = NULL |
||
) |
Definition at line 871 of file unit_generic.h.
References Position(), and ToLocalCoordinates().
Referenced by Mount::NextMountCloser(), and Radar::Track::Track().
|
inline |
Definition at line 947 of file unit_generic.h.
References curr_physical_state, and Transformation::position.
Referenced by GameCockpit::Autopilot(), calculate_extent(), Collidable::Collidable(), createObjects(), GameStarSystem::DoJumpingComeSightAndSound(), GameStarSystem::DoJumpingLeaveSightAndSound(), PlanetaryOrbit::Execute(), Orders::FaceTarget::Execute(), Orders::AutoLongHaul::Execute(), SaveNetUtil::GetSaveStrings(), StarSystem::ProcessPendingJumps(), RealPosition(), UniverseUtil::SafeStarSystemEntrancePoint(), ShoveCamBehindUnit(), ShoveCamBelowUnit(), GameUnit< UnitType >::TransferUnitToSystem(), GameBuilding::UpdatePhysics2(), and WriteSaveGame().
int Unit::LockMissile | ( | ) | const |
Definition at line 5561 of file unit_generic.cpp.
References Mount::ACTIVE, and isMissile().
void Unit::LockTarget | ( | bool | myboo) |
Definition at line 5275 of file unit_generic.cpp.
References UnitUtil::isSignificant().
Referenced by FireKeyboard::Execute().
void Unit::LongitudinalThrust | ( | float | amt) |
float Unit::LShieldData | ( | ) | const |
Definition at line 4812 of file unit_generic.cpp.
Referenced by GameCockpit::LookupTargetStat(), GameCockpit::LookupUnitStat(), Orders::AggressiveAI::ProcessLogicItem(), Orders::AggressiveAI::SetParent(), and UpAndDownGrade().
|
static |
Definition at line 1793 of file unit_csv.cpp.
References AddCargo(), UnitImages< BOGUS >::cargo, Cargo::category, VSFileSystem::VSFile::Close(), Cargo::content, Cargo::description, GetCargo(), GetImageInformation(), VSFileSystem::VSFile::GetRoot(), VegaConfig::getVariable(), i, Cargo::mass, name, VSFileSystem::Ok, VSFileSystem::VSFile::OpenReadOnly(), Cargo::price, Cargo::quantity, stof(), stoi(), Unit(), VSFileSystem::UnknownFile, UpdateMasterPartList(), Cargo::volume, and vs_config.
Referenced by UnitFactory::getMasterPartList().
|
staticprotected |
Definition at line 8581 of file unit_generic.cpp.
References UnitImages< BOGUS >::cargo, VegaConfig::getVariable(), Mass, XMLSupport::parse_bool(), pImage, XMLSupport::tostring(), and vs_config.
|
inline |
Definition at line 911 of file unit_generic.h.
References maxenergy.
Referenced by ZoneMgr::addDamage(), and showUnitStats().
|
protected |
Definition at line 7547 of file unit_generic.cpp.
References Mount::ACTIVE, Mount::INACTIVE, Mount::UNCHOSEN, and Vector.
|
staticprotected |
Definition at line 8621 of file unit_generic.cpp.
References Mount::ACTIVE, GetNumMounts(), Matrix::getQ(), Matrix::getR(), XMLType::wordlength::hardint, Mount::INACTIVE, lookupMountSize(), mounts, Matrix::p, XMLSupport::parse_float(), XMLType::str, tostring(), XMLSupport::tostring(), and XMLType::w.
unsigned int Unit::numCargo | ( | ) | const |
Definition at line 8427 of file unit_generic.cpp.
Referenced by NetServer::addUnitCargoSnapshot(), Arrested(), buyShip(), BaseComputer::configureUpgradeCommitControls(), UnitUtil::decrementCargo(), DropCargo(), DropHalfCargo(), DropOneCargo(), eliminateZeroCargo(), Enslave(), FireKeyboard::Execute(), Pilot::getAnger(), UniverseUtil::getRandCargo(), ImportPartList(), UnitUtil::incrementCargo(), CommunicatingAI::InitiateContrabandSearch(), InList(), BaseComputer::loadMasterList(), makeBlankUpgrade(), UnitUtil::RecomputeUnitUpgrades(), CommunicatingAI::UpdateContrabandSearch(), UpdateMasterPartList(), UpgradeAllowed(), and WriteUnitString().
|
inlinevirtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 507 of file unit_generic.h.
References meshdata.
Referenced by getCollideTree(), querySphere(), and querySphereNoRecurse().
void Unit::PerformDockingOperations | ( | ) |
CHOOSE NEW MISSION
force him in a box...err where he is
Definition at line 5795 of file unit_generic.cpp.
References _Universe, Universe::AccessCockpit(), AngularVelocity, curr_physical_state, Cockpit::GetParent(), HoldPositionWithRespectTo(), NetForce, NetLocalForce, NetLocalTorque, NetTorque, prev_physical_state, UpgradeInterface(), Vector, and Velocity.
void Unit::PitchTorque | ( | float | amt) |
|
inline |
Definition at line 938 of file unit_generic.h.
References cumulative_transformation, and Transformation::position.
Referenced by ActuallyWarpTo(), AddUnitToSystem(), AdjustMatrix(), Orders::AggressiveAI::AfterburnerJumpTurnTowards(), AfterburnerSlide(), AfterburnTurnAway(), AfterburnVeerAndTurnAway(), aim_assist(), AllUnitsCloseAndEngage(), MissileEffect::ApplyDamage(), AutoPilotToErrorMessage(), buyShip(), CalculateNearestWarpUnit(), CanDockWithMe(), CanFaceTarget(), Orders::FireAt::ChangeLocalDirection(), ChooseNearNavPoint(), CloseEnoughToNavOrDest(), Terrain::Collide(), ContinuousTerrain::Collide(), Beam::Collide(), Collide(), compute_light_dot(), CrashForceDock(), DealPossibleJumpDamage(), Mission::DirectorShipDestroyed(), Missile::Discharge(), DistanceTwoTargets(), GameCockpit::DoAutoLanding(), dockingdistance(), DockToSavedBases(), Orders::DockingOps::DockToTarget(), GameStarSystem::DoJumpingLeaveSightAndSound(), WarpTrail::Draw(), GameStarSystem::Draw(), VDU::Draw(), GameCockpit::Draw(), GameStarSystem::DrawJumpStars(), EjectCargo(), Orders::TurretAI::Execute(), Orders::MoveToParent::Execute(), Orders::ChangeHeading::Execute(), Orders::FaceTarget::Execute(), Orders::AutoLongHaul::Execute(), Orders::FaceTargetITTS::Execute(), Orders::FaceDirection::Execute(), Orders::LoopAround::Execute(), Orders::LoopAroundAgro::Execute(), Orders::FacePerpendicular::Execute(), Orders::AggressiveAI::ExecuteNoEnemies(), GameUnit< UnitType >::Explode(), FaceCamTarget(), FaceTarget(), anonymous_namespace{autodocking.cpp}::FindDockingPort(), getAtmospheric(), UnitUtil::getDistance(), getNearestTarget(), getNearestTargetUnit(), UnitUtil::getPhysicsPriority(), CommunicatingAI::GetRandomUnit(), GetThreat(), NetClient::inGame(), InRange(), Inside(), InsideCollideTree(), StarSystem::JumpTo(), LoadMission(), LocalCoordinates(), GameCockpit::LookupUnitStat(), Orders::DockingOps::Movement(), MoveTo(), Nearby(), Orders::DockingOps::PerformDockingOperations(), Priority(), Orders::AggressiveAI::ProcessCurrentFgDirective(), Orders::AggressiveAI::ProcessLogicItem(), querySphere(), querySphereNoRecurse(), rayCollide(), GamePlanet::reactToCollision(), reactToCollision(), RealPosition(), SelectDockPort(), SetupVAndTargetV(), GameCockpit::SetupViewPort(), SheltonSlide(), ShoveCamBehindUnit(), ShoveCamBelowUnit(), SkilledABSlide(), TargFront(), GameUnit< UnitType >::Thrust(), GameUnit< UnitType >::TransferUnitToSystem(), TurnAway(), Orders::DockingOps::Undock(), Cockpit::Update(), UpdatePhysics(), GameMissile::UpdatePhysics2(), Missile::UpdatePhysics2(), VectorThrustHelper(), WarpToP(), GameUniverse::WriteSaveGame(), and WriteUnitString().
QVector Unit::PositionITTS | ( | const QVector & | firingposit, |
Vector | firingvelocity, | ||
float | gunspeed, | ||
bool | smooth_itts | ||
) | const |
Definition at line 1667 of file unit_generic.cpp.
References game_data_t::difficulty, g_game, QVector, and speed.
Referenced by AdjustMatrix(), cosAngleFromMountTo(), cosAngleTo(), and Orders::FaceTargetITTS::Execute().
float Unit::PriceCargo | ( | const std::string & | s) |
Definition at line 7761 of file unit_generic.cpp.
References Cargo::content, UnitFactory::getMasterPartList(), VegaConfig::getVariable(), XMLSupport::parse_float(), PriceCargo(), and vs_config.
Referenced by BaseComputer::SellUpgradeOperation::concludeTransaction(), BaseComputer::configureUpgradeCommitControls(), PriceCargo(), RepairUpgradeCargo(), SellCargo(), and BaseComputer::updateTransactionControlsForSelection().
void Unit::PrimeOrders | ( | ) |
Definition at line 1942 of file unit_generic.cpp.
References Order::SetParent().
Referenced by NetClient::AddClientObject(), Arrested(), Mission::call_unit_launch(), EjectCargo(), Orders::AggressiveAI::ExecuteNoEnemies(), UnitUtil::orbit(), UnitUtil::performDockingOperations(), SwitchUnits(), SwitchUnits2(), and SwitchUnitsTurret().
void Unit::PrimeOrders | ( | Order * | newAI) |
Definition at line 1930 of file unit_generic.cpp.
References Order::SetParent().
void Unit::PrimeOrdersLaunched | ( | ) |
Definition at line 1952 of file unit_generic.cpp.
References Vector.
|
static |
might modify unitdeletequeue
Definition at line 4870 of file unit_generic.cpp.
References Unitdeletequeue, and VSFileSystem::vs_fprintf().
Referenced by StarSystem::Update().
|
inline |
Definition at line 1380 of file unit_generic.h.
Definition at line 406 of file unit_collide.cpp.
References UnitCollection::constFastIterator(), cumulative_transformation_matrix, UnitCollection::empty(), Matrix::getP(), graphicOptions, i, isPlanet(), meshdata, nummesh(), Matrix::p, Position(), radial_size, Unit::graphic_options::RecurseIntoSubUnitsOnCollision, UniverseUtil::sqrt(), SubUnits, Transform(), and Vector.
Referenced by Inside(), GameMissile::UpdatePhysics2(), and Missile::UpdatePhysics2().
float Unit::querySphere | ( | const QVector & | start, |
const QVector & | end, | ||
float | my_unit_radius = 0 |
||
) | const |
Definition at line 460 of file unit_collide.cpp.
References UnitCollection::constFastIterator(), UnitCollection::empty(), i, querySphereNoRecurse(), and SubUnits.
Definition at line 5655 of file unit_generic.cpp.
References Matrix::getP(), k, perplines, querySphereClickList(), QVector, Transform(), and Vector.
Referenced by querySphereClickList().
Queries the bounding sphere with a duo of mouse coordinates that project to the center of a ship and compare with a sphere...pretty fast queries the sphere for weapons (world space point) Only in Unit class
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 1391 of file unit_generic.h.
float Unit::querySphereNoRecurse | ( | const QVector & | start, |
const QVector & | end, | ||
float | my_unit_radius = 0 |
||
) | const |
Definition at line 474 of file unit_collide.cpp.
References a, b, c, cumulative_transformation_matrix, i, isUnit(), Magnitude(), meshdata, nummesh(), PLANETPTR, Position(), QVector, rSize(), UniverseUtil::sqrt(), start, and Transform().
Referenced by querySphere(), and rayCollide().
Unit * Unit::rayCollide | ( | const QVector & | st, |
const QVector & | end, | ||
Vector & | normal, | ||
float & | distance | ||
) |
Definition at line 346 of file unit_collide.cpp.
References collideTrees::colTree(), colTrees, cumulative_transformation_matrix, UnitCollection::empty(), f, UnitCollection::fastIterator(), VegaConfig::getVariable(), GetWarpVelocity(), globQuerySphere(), graphicOptions, i, InvTransform(), Magnitude(), Matrix::p, XMLSupport::parse_bool(), Position(), querySphereNoRecurse(), QVector, csOPCODECollider::rayCollide(), rayCollide(), Unit::graphic_options::RecurseIntoSubUnitsOnCollision, rSize(), start, SubUnits, Vector, vs_config, and VSFileSystem::vs_dprintf().
Referenced by Bolt::Collide(), Beam::Collide(), and rayCollide().
|
virtual |
Reimplemented in Planet, Missile, GameMissile, Nebula, Enhancement, and Asteroid.
Definition at line 388 of file unit_generic.cpp.
References _Universe, Universe::AccessCamera(), ApplyDamage(), ApplyForce(), ApplyTorque(), UniverseUtil::cos(), CrashForceDock(), e, ENHANCEMENTPTR, f, StarSystemGent::faction, faction, float, Unit::Limits::forward, GetAngularVelocity(), UnitUtil::getFlightgroupName(), GetMass(), getNewTime(), Camera::GetPosition(), Camera::GetR(), FactionUtil::GetUpgradeFaction(), VegaConfig::getVariable(), GetVelocity(), Matrix::InvertRotationInto(), Universe::isPlayerStarship(), isUnit(), Unit::Limits::lateral, limits, m1, MakeNonColinearVector(), MISSILEPTR, Network, Orthogonize(), UnitUtil::owner(), owner, XMLSupport::parse_bool(), XMLSupport::parse_float(), Unit::Limits::pitch, Position(), radial_size, reactToCollision(), Unit::Limits::retro, Unit::Limits::roll, sim_atom_multiplier, SIMULATION_ATOM, Cockpit::TimeOfLastCollision, Transform(), FactionUtil::upgradefac, Vector, Unit::Limits::vertical, vs_config, and Unit::Limits::yaw.
Referenced by Collide(), Asteroid::reactToCollision(), Missile::reactToCollision(), Planet::reactToCollision(), and reactToCollision().
bool Unit::ReduceToTemplate | ( | ) |
Definition at line 7528 of file unit_generic.cpp.
References makeFinalBlankUpgrade(), and name.
Referenced by UnitUtil::RecomputeUnitUpgrades().
|
inline |
Definition at line 29 of file unit.h.
Referenced by UnitCollection::append(), UnitCollection::insert(), UnitCollection::insert_unique(), UnitCollection::prepend(), and UnitContainer::SetUnit().
void Unit::Ref | ( | ) |
bool Unit::RefillWarpEnergy | ( | ) |
Definition at line 5827 of file unit_generic.cpp.
References VegaConfig::getVariable(), XMLSupport::parse_bool(), and vs_config.
Referenced by Orders::DockingOps::DockToTarget().
|
protected |
Definition at line 3652 of file unit_generic.cpp.
References _Universe, applyto(), game_data_t::difficulty, FINITE, fprintf, g_game, VegaConfig::getVariable(), UniverseUtil::IOmessage(), Universe::isPlayerStarship(), XMLSupport::parse_bool(), XMLSupport::parse_float(), SIMULATION_ATOM, totalShieldEnergyCapacitance(), vs_config, and WARPENERGYMULTIPLIER().
Definition at line 8201 of file unit_generic.cpp.
References _Universe, NetServer::BroadcastCargoUpgrade(), NetClient::cargoRequest(), fprintf, Cargo::GetContent(), VegaConfig::getVariable(), Cargo::mass, Cargo::mission, Universe::netLocked(), Network, XMLSupport::parse_bool(), Cargo::price, Cargo::quantity, SERVER, Cargo::volume, vs_config, VSServer, and Universe::whichPlayerStarship().
Referenced by Arrested(), BuyCargo(), buyShip(), BaseComputer::BuyUpgradeOperation::concludeTransaction(), UnitUtil::decrementCargo(), eliminateZeroCargo(), Enslave(), makeBlankUpgrade(), UnitUtil::removeCargo(), BaseComputer::sellSelectedCargo(), and UpdateMasterPartList().
void Unit::RemoveFromSystem | ( | ) |
Definition at line 27 of file unit_collide.cpp.
References _Universe, Universe::activeStarSystem(), activeStarSystem, weapon_info::BEAM, CollideArray::begin(), CollideArray::checkSet(), StarSystem::collidemap, CollideArray::end(), CollideArray::erase(), GetNumMounts(), VegaConfig::getVariable(), i, is_null(), j, location, mounts, NUM_COLLIDE_MAPS, XMLSupport::parse_bool(), set_null(), and vs_config.
Referenced by SelfDestruct().
void Unit::Repair | ( | ) |
Definition at line 8837 of file unit_generic.cpp.
References Cargo::category, Cargo::content, DamagedCategory, UnitCollection::empty(), VSRandom::genrand_int31(), UnitUtil::GetCargo(), Cargo::GetCategory(), Cargo::GetContent(), UniverseUtil::GetGameTime(), GetNumMounts(), getUnitFromUpgradeName(), FactionUtil::GetUpgradeFaction(), VegaConfig::getVariable(), makeTemplateUpgrade(), MAXVDUS, name, XMLSupport::parse_float(), UnitUtil::PercentOperational(), REPAIRINTEGRATED, SIMULATION_ATOM, SubUnits, vs_config, VSFileSystem::vs_fprintf(), and vsrandom.
int Unit::RepairCost | ( | ) |
Definition at line 7556 of file unit_generic.cpp.
References DamagedCategory, UnitUtil::GetCargo(), and Cargo::GetCategory().
Referenced by BasicRepair(), BaseComputer::loadBuyUpgradeControls(), and BaseComputer::updateTransactionControlsForSelection().
int Unit::RepairUpgrade | ( | ) |
Definition at line 7585 of file unit_generic.cpp.
References Cargo::category, UnitImages< BOGUS >::cockpit_damage, UnitImages< BOGUS >::CommFunctionality, UnitImages< BOGUS >::CommFunctionalityMax, DamagedCategory, StarSystemGent::faction, UnitImages< BOGUS >::fireControlFunctionality, UnitImages< BOGUS >::fireControlFunctionalityMax, UnitUtil::GetCargo(), Cargo::GetCategory(), UnitFactory::getMasterPartList(), FactionUtil::GetUpgradeFaction(), VegaConfig::getVariable(), UnitImages< BOGUS >::LifeSupportFunctionality, UnitImages< BOGUS >::LifeSupportFunctionalityMax, loadUnitByCache(), makeFinalBlankUpgrade(), makeTemplateUpgrade(), maxenergy, MaxShieldVal(), name, XMLSupport::parse_bool(), Shield::recharge, recharge, shield, UnitImages< BOGUS >::SPECDriveFunctionality, UnitImages< BOGUS >::SPECDriveFunctionalityMax, and vs_config.
Referenced by BasicRepair(), and UnitUtil::repair().
Definition at line 7692 of file unit_generic.cpp.
References c, Cargo::category, Cargo::content, DamagedCategory, Mount::DESTROYED, UnitUtil::GetCargo(), Cargo::GetCategory(), Cargo::GetContent(), GetNumMounts(), getUnitFromUpgradeName(), Mount::INACTIVE, isWeapon(), makeTemplateUpgrade(), mounts, UnitUtil::PercentOperational(), Cargo::price, PriceCargo(), RepairPrice(), Mount::type, UnitUtil::upgrade(), and weapon_info::weapon_name.
Referenced by BaseComputer::fixUpgrade().
Definition at line 5751 of file unit_generic.cpp.
Referenced by DoDockingOps(), ExecuteRequestClearenceKey(), Order::ProcessCommunicationMessages(), and Orders::DockingOps::RequestClearence().
void Unit::RequestPhysics | ( | ) |
|
inline |
Definition at line 1235 of file unit_generic.h.
References computer, graphicOptions, Unit::graphic_options::missilelock, and Unit::Computer::threatlevel.
Referenced by StarSystem::ExecuteUnitAI(), and StarSystem::UpdateUnitPhysics().
|
virtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 3893 of file unit_generic.cpp.
References _Universe, active_missions, UniverseUtil::cacheAnimation(), FINITE, VegaConfig::getVariable(), UniverseUtil::getVariable(), InvTransformNormal(), Universe::isPlayerStarship(), XMLSupport::parse_float(), UniverseUtil::playAnimationGrow(), q, RealPosition(), SIMULATION_ATOM, v, Vector, vs_config, and VSFileSystem::vs_fprintf().
Referenced by GameUnit< UnitType >::ResolveForces().
void Unit::RestoreGodliness | ( | ) |
Definition at line 285 of file unit_generic.cpp.
References _Universe, Universe::AccessCockpit(), and Cockpit::RestoreGodliness().
void Unit::ReTargetFg | ( | int | which_target = 0 ) |
Definition at line 2045 of file unit_generic.cpp.
References _Universe, Universe::activeStarSystem(), UnitCollection::createIterator(), and StarSystem::getUnitList().
void Unit::RollTorque | ( | float | amt) |
void Unit::Rotate | ( | const Vector & | axis) |
Definition at line 3187 of file unit_generic.cpp.
References UniverseUtil::cos(), Matrix::getR(), and identity_quaternion().
float Unit::RShieldData | ( | ) | const |
Definition at line 4841 of file unit_generic.cpp.
Referenced by GameCockpit::LookupTargetStat(), GameCockpit::LookupUnitStat(), Orders::AggressiveAI::ProcessLogicItem(), Orders::AggressiveAI::ReCommandWing(), Orders::AggressiveAI::SetParent(), and UpAndDownGrade().
|
inline |
Definition at line 932 of file unit_generic.h.
References radial_size.
Referenced by Radar::CollectRadarTracks::acquire(), Planet::AddSpaceElevator(), MissileEffect::ApplyDamage(), GameCockpit::Autopilot(), AutoPilotToErrorMessage(), AutoSafeEntrancePoint(), CalculateNearestWarpUnit(), Mission::call_unit_launch(), CanDockWithMe(), ChooseNearNavPoint(), CloseEnoughToNavOrDest(), Collidable::Collidable(), Terrain::Collide(), ContinuousTerrain::Collide(), Beam::Collide(), Collide(), collideTrees::colTree(), cosAngleFromMountTo(), cosAngleTo(), CrashForceDock(), createObjects(), DistanceTwoTargets(), GameCockpit::DoAutoLanding(), dockingdistance(), DockToSavedBases(), Orders::DockingOps::DockToTarget(), GameStarSystem::DoJumpingComeSightAndSound(), GameStarSystem::DoJumpingLeaveSightAndSound(), WarpTrail::Draw(), GameStarSystem::Draw(), BaseInterface::Room::BaseShip::Draw(), GameStarSystem::DrawJumpStars(), EjectCargo(), Orders::TurretAI::Execute(), PlanetaryOrbit::Execute(), Orders::AutoLongHaul::Execute(), Orders::FaceDirection::Execute(), Orders::LoopAround::Execute(), Orders::LoopAroundAgro::Execute(), Orders::AggressiveAI::ExecuteNoEnemies(), anonymous_namespace{autodocking.cpp}::FindDockingPort(), anonymous_namespace{autodocking.cpp}::FindWaypoint(), getAtmospheric(), getAutoRSize(), UnitUtil::getDistance(), UnitUtil::getPhysicsPriority(), CommunicatingAI::GetRandomUnit(), UnitUtil::getSignificantDistance(), Radar::Track::GetSize(), InRange(), InsideCollideTree(), LaunchOneParticle(), LoadMission(), LoadRow(), GameCockpit::LookupUnitStat(), Orders::AggressiveAI::ProcessCurrentFgDirective(), Orders::AggressiveAI::ProcessLogicItem(), querySphereNoRecurse(), rayCollide(), UniverseUtil::SafeStarSystemEntrancePoint(), ShoveCamBehindUnit(), ShoveCamBelowUnit(), TargFront(), GameUnit< UnitType >::TransferUnitToSystem(), Orders::DockingOps::Undock(), Cockpit::Update(), GameNebula::UpdatePhysics2(), GameMissile::UpdatePhysics2(), Missile::UpdatePhysics2(), UpgradeSubUnitsWithFactory(), WarpMatrixForCollisions(), and WarpToP().
void Unit::Select | ( | ) |
Definition at line 1814 of file unit_generic.cpp.
void Unit::SelectAllWeapon | ( | bool | Missile) |
Definition at line 5365 of file unit_generic.cpp.
References Mount::DESTROYED, and weapon_info::SPECIAL.
Referenced by Takeoff(), and TakeoffEveryZig().
Definition at line 8453 of file unit_generic.cpp.
References _Universe, AddCargo(), CanAddCargo(), Universe::netLocked(), Network, Cargo::price, PriceCargo(), Cargo::quantity, NetServer::sendCredits(), SERVER, and VSServer.
Referenced by BaseComputer::sellSelectedCargo(), and BaseComputer::sellUpgrade().
bool Unit::SellCargo | ( | const std::string & | s, |
int | quantity, | ||
float & | creds, | ||
Cargo & | carg, | ||
Unit * | buyer | ||
) |
Definition at line 8473 of file unit_generic.cpp.
References Cargo::content.
void Unit::SetAfterBurn | ( | float | aft) |
Definition at line 149 of file unit_generic.cpp.
void Unit::SetAI | ( | Order * | newAI) |
Definition at line 1966 of file unit_generic.cpp.
References Order::SetParent().
Referenced by EjectCargo(), Planet::InitPlanet(), GamePlanet::Kill(), Planet::Kill(), and SwitchUnits().
void Unit::SetAllVisible | ( | bool | isvis) |
void Unit::SetAngularVelocity | ( | const Vector & | v) |
Definition at line 240 of file unit_generic.cpp.
References v.
Referenced by CheckAccessory(), BaseInterface::Room::Eject::Click(), EjectCargo(), Orders::DockingOps::Execute(), Orders::ChangeHeading::Execute(), Planet::InitPlanet(), and SetSubunitRotation().
void Unit::setAttackPreference | ( | const std::string & | s) |
Definition at line 8675 of file unit_generic.cpp.
References ROLES::getRole().
Referenced by LoadRow().
void Unit::setAverageGunSpeed | ( | ) |
Definition at line 1628 of file unit_generic.cpp.
References Mount::ACTIVE, weapon_info::BEAM, Mount::INACTIVE, isMissile(), and speed.
Referenced by LoadRow(), and Mount::ReplaceMounts().
void Unit::SetCollisionParent | ( | Unit * | name) |
Definition at line 5611 of file unit_generic.cpp.
References SetCollisionParent().
Referenced by SetCollisionParent().
void Unit::setCombatRole | ( | const std::string & | s) |
Definition at line 8691 of file unit_generic.cpp.
References ROLES::getRole().
|
inline |
Sets the cumulative transformation matrix's position...for setting up to be out in the middle of nowhere.
Definition at line 954 of file unit_generic.h.
References curr_physical_state, and Transformation::position.
Referenced by PlanetaryOrbit::Execute(), StarSystem::ProcessPendingJumps(), Cockpit::Update(), and GameBuilding::UpdatePhysics2().
void Unit::SetEnergyRecharge | ( | float | enrech) |
Definition at line 159 of file unit_generic.cpp.
void Unit::setFaceCamera | ( | ) |
Definition at line 98 of file unit_generic.cpp.
Referenced by GamePlanet::AddFog().
void Unit::SetFaction | ( | int | faction) |
Definition at line 1586 of file unit_generic.cpp.
References StarSystemGent::faction.
Referenced by UnitUtil::setFactionIndex(), UnitUtil::setFactionName(), and UpgradeSubUnitsWithFactory().
void Unit::SetFg | ( | Flightgroup * | fg, |
int | fg_snumber | ||
) |
Definition at line 1599 of file unit_generic.cpp.
Referenced by FireKeyboard::JoinFg(), Orders::AggressiveAI::ProcessCurrentFgDirective(), and UnitUtil::switchFg().
void Unit::SetFuel | ( | float | f) |
Definition at line 154 of file unit_generic.cpp.
|
inline |
Definition at line 1498 of file unit_generic.h.
References fullname, and name.
Referenced by Planet::beginElement(), and Planet::InitPlanet().
void Unit::SetGlowVisible | ( | bool | isvis) |
Definition at line 1859 of file unit_generic.cpp.
Referenced by FireKeyboard::Execute().
void Unit::SetMaxEnergy | ( | float | maxen) |
Definition at line 164 of file unit_generic.cpp.
void Unit::SetNebula | ( | Nebula * | neb) |
Definition at line 113 of file unit_generic.cpp.
References SetNebula().
Referenced by Nebula::reactToCollision(), SetNebula(), and StarSystem::Update().
void Unit::SetNetworkMode | ( | bool | mode = true ) |
Definition at line 79 of file unit_generic.cpp.
References UniverseUtil::networked().
Referenced by NetClient::AddClientObject(), and createObjects().
Definition at line 4003 of file unit_generic.cpp.
References Quaternion::from_vectors(), and QVector.
Referenced by Planet::AddSpaceElevator(), EjectCargo(), Orders::ChangeHeading::Execute(), and FaceTarget().
void Unit::SetOrientation | ( | Quaternion | Q) |
Definition at line 4021 of file unit_generic.cpp.
void Unit::SetOwner | ( | Unit * | target) |
Definition at line 5339 of file unit_generic.cpp.
References UnitUtil::owner().
Referenced by Planet::AddSatellite(), Planet::beginElement(), BaseInterface::Room::Eject::Click(), Orders::DockingOps::Destroy(), EjectCargo(), UnitUtil::orbit(), Mount::PhysicsAlignedFire(), Orders::DockingOps::RestoreOldAI(), and Orders::DockingOps::SetParent().
|
inline |
Definition at line 958 of file unit_generic.h.
References cumulative_transformation, cumulative_transformation_matrix, Matrix::p, Transformation::position, and SetPosition().
Referenced by Mission::call_unit_launch(), BaseInterface::Room::Eject::Click(), CrashForceDock(), createObjects(), GameCockpit::DoAutoLanding(), DockToSavedBases(), EjectCargo(), LoadMission(), and NetClient::Respawn().
void Unit::SetPosition | ( | const QVector & | pos) |
Definition at line 192 of file unit_generic.cpp.
Referenced by Planet::AddSpaceElevator(), AddUnitToSystem(), AutoPilotToErrorMessage(), and SetPosAndCumPos().
void Unit::SetRecursiveOwner | ( | Unit * | target) |
Definition at line 5553 of file unit_generic.cpp.
References UnitUtil::owner(), and SetRecursiveOwner().
Referenced by Planet::AddSpaceElevator(), Planet::InitPlanet(), SetRecursiveOwner(), and UpgradeSubUnitsWithFactory().
void Unit::SetResolveForces | ( | bool | ys) |
Definition at line 1594 of file unit_generic.cpp.
Referenced by PlanetaryOrbit::Execute(), PlanetaryOrbit::PlanetaryOrbit(), and PlanetaryOrbit::~PlanetaryOrbit().
void Unit::SetSerial | ( | ObjSerial | s) |
Definition at line 84 of file unit_generic.cpp.
Referenced by NetClient::AddClientObject(), UnitFactory::createAsteroid(), UnitFactory::createMissile(), UnitFactory::createNebula(), createObjects(), UnitFactory::createPlanet(), UnitFactory::createUnit(), NetClient::inGame(), Mount::PhysicsAlignedFire(), and NetClient::Respawn().
void Unit::setTargetFg | ( | std::string | primary, |
std::string | secondary = std::string() , |
||
std::string | tertiary = std::string() |
||
) |
void Unit::setTractorability | ( | enum tractorHow | how) |
Definition at line 8927 of file unit_generic.cpp.
Referenced by LoadRow().
void Unit::SetTurretAI | ( | ) |
Definition at line 2079 of file unit_generic.cpp.
References aistate, CheckAccessory(), Order::Destroy(), EnqueueAIFirst(), VegaConfig::getVariable(), XMLSupport::parse_bool(), Order::SetParent(), SetTurretAI(), and vs_config.
Referenced by AddUnitToSystem(), Mission::call_unit_launch(), createObjects(), EjectCargo(), FireKeyboard::Execute(), Planet::InitPlanet(), LoadMission(), UnitUtil::orbit(), Mount::PhysicsAlignedFire(), Orders::AggressiveAI::ProcessCurrentFgDirective(), SetTurretAI(), SwitchUnits2(), Cockpit::Update(), and UnitUtil::upgrade().
void Unit::setUnitRole | ( | const std::string & | s) |
Definition at line 8670 of file unit_generic.cpp.
References ROLES::getRole().
Referenced by LoadRow().
void Unit::SetVelocity | ( | const Vector & | v) |
Definition at line 235 of file unit_generic.cpp.
References v.
Referenced by CarSimUpdate(), BaseInterface::Room::Eject::Click(), EjectCargo(), Orders::AggressiveAI::Execute(), Mount::PhysicsAlignedFire(), and StarSystem::ProcessPendingJumps().
void Unit::SetVisible | ( | bool | isvis) |
Definition at line 1843 of file unit_generic.cpp.
Referenced by GameCockpit::SetupViewPort(), and SwitchUnits().
|
inline |
Definition at line 915 of file unit_generic.h.
References Shield::recharge, and shield.
|
staticprotected |
Definition at line 8593 of file unit_generic.cpp.
References Shield::number, shield, Shield::shield2fb, Shield::shield4fbrl, Shield::shield8, and tostring().
Definition at line 5184 of file unit_generic.cpp.
References VegaConfig::getVariable(), XMLSupport::parse_float(), and vs_config.
|
protected |
Definition at line 8713 of file unit_generic.cpp.
References UnitImages< BOGUS >::cargo, and pImage.
Referenced by cargoSerializer().
|
inlinevirtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 515 of file unit_generic.h.
Referenced by SelfDestruct().
vector< Mesh * > Unit::StealMeshes | ( | ) |
Definition at line 1330 of file unit_generic.cpp.
Referenced by Briefing::Ship::Ship().
|
staticprotected |
Definition at line 8654 of file unit_generic.cpp.
References XMLSerializer::getName(), getSubUnits(), XMLType::wordlength::hardint, index, name, pImage, UnitImages< BOGUS >::unitwriter, and XMLType::w.
void Unit::SwitchCombatFlightMode | ( | ) |
Unit * Unit::Target | ( | ) |
Definition at line 270 of file unit_generic.cpp.
Referenced by Radar::CollectRadarTracks::acquire(), CommunicatingAI::AdjustRelationTo(), Pilot::adjustSpecificRelationship(), AfterburnTurnAway(), AfterburnVeerAndTurnAway(), AllUnitsCloseAndEngage(), Arrested(), TurretBin::AssignTargets(), Order::AttachOrder(), ZoneMgr::broadcastSnapshots(), Mission::call_unit_launch(), ChooseSubTargets(), Orders::FireAt::ChooseTargets(), ChooseTargets(), DockedScript(), DoDockingOps(), GameStarSystem::Draw(), GameUnit< UnitType >::Draw(), GameCockpit::Draw(), NavigationSystem::DrawSystem(), Orders::TurretAI::Execute(), Orders::Ikarus::Execute(), Orders::AggressiveAI::Execute(), Orders::FireAt::Execute(), FlyByKeyboard::Execute(), Orders::FaceTarget::Execute(), Orders::AutoLongHaul::Execute(), FireKeyboard::Execute(), Orders::FaceTargetITTS::Execute(), Orders::LoopAround::Execute(), Orders::LoopAroundAgro::Execute(), Orders::FacePerpendicular::Execute(), FlyTo::Execute(), Orders::AggressiveAI::ExecuteNoEnemies(), FaceTarget(), Radar::Sensor::FindTracksInRange(), FireBitmask(), ForceChangeTarget(), getAutoRSize(), getNearestTargetUnit(), UnitUtil::getPhysicsPriority(), CommunicatingAI::GetRandomUnit(), UnitWrapper::GetTarget(), GameCockpit::getTargetLabel(), GetThreat(), Radar::Track::HasLock(), HelpOut(), Radar::Sensor::IsTracking(), FireKeyboard::JoinFg(), KickstopBase(), LeadMe(), GameCockpit::LookupUnitStat(), MoveTo(), Mount::NextMountCloser(), Mount::PhysicsAlignedFire(), Priority(), Orders::AggressiveAI::ProcessCurrentFgDirective(), Orders::AggressiveAI::ProcessLogicItem(), Orders::FireAt::PursueTarget(), RequestClearence(), CommunicatingAI::selectCommunicationMessageMood(), NetClient::sendPosition(), Orders::AutoLongHaul::SetParent(), UnitWrapper::SetTarget(), GameCockpit::setTargetLabel(), SetupVAndTargetV(), GameCockpit::SetupViewPort(), Orders::FireAt::ShouldFire(), Orders::AggressiveAI::SignalChosenTarget(), SwitchUnits(), Target(), UniverseUtil::TargetEachOther(), TargetTurret(), TargIncomingMissile(), TargThreat(), GameUnit< UnitType >::TransferUnitToSystem(), TurnAway(), Cockpit::Update(), Cockpit::updateAttackers(), UpdatePhysics(), GameMissile::UpdatePhysics2(), Missile::UpdatePhysics2(), UpdateSubunitPhysics(), and VectorThrustHelper().
void Unit::Target | ( | Unit * | targ) |
Definition at line 5282 of file unit_generic.cpp.
References _Universe, Universe::activeStarSystem(), activeStarSystem, NetServer::BroadcastTarget(), UnitCollection::constIterator(), GetDestinations(), StarSystem::getFileName(), GetSerial(), getStarSystem(), StarSystem::getUnitList(), Universe::isPlayerStarship(), SERVER, Target(), VSServer, and WarpPursuit().
|
inline |
Definition at line 1172 of file unit_generic.h.
References computer, Unit::Computer::RADARLIM::locked, and Unit::Computer::radar.
Referenced by FireKeyboard::Execute(), and Radar::Track::HasWeaponLock().
void Unit::TargetTurret | ( | Unit * | targ) |
Definition at line 5246 of file unit_generic.cpp.
References Target(), and TargetTurret().
Referenced by CommunicatingAI::AdjustRelationTo(), AllUnitsCloseAndEngage(), TurretBin::AssignTargets(), FireKeyboard::Execute(), Mount::PhysicsAlignedFire(), Orders::AggressiveAI::ProcessCurrentFgDirective(), TargetTurret(), and Missile::UpdatePhysics2().
Unit * Unit::Threat | ( | ) |
Definition at line 280 of file unit_generic.cpp.
Referenced by Orders::FireAt::ChooseTargets(), GameCockpit::Draw(), Priority(), Orders::AggressiveAI::ProcessCurrentFgDirective(), Orders::AggressiveAI::ReCommandWing(), TargThreat(), and GameUnit< UnitType >::TransferUnitToSystem().
Definition at line 1798 of file unit_generic.cpp.
References owner, and PARANOIA.
Referenced by GameCockpit::Draw(), Orders::FireAt::ShouldFire(), and GameUnit< UnitType >::TransferUnitToSystem().
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 3499 of file unit_generic.cpp.
References Vector.
Referenced by FlyByWire::Execute(), Orders::AggressiveAI::ExecuteNoEnemies(), and GameUnit< UnitType >::Thrust().
Definition at line 5545 of file unit_generic.cpp.
References WeaponComparator< FORWARD >::ToggleWeaponSet().
Referenced by BaseComputer::BuyUpgradeOperation::concludeTransaction(), FireKeyboard::Execute(), and FireKeyboard::SetParent().
Definition at line 4048 of file unit_generic.cpp.
Referenced by VDU::Draw(), GameCockpit::Draw(), Orders::MoveToParent::Execute(), Orders::MatchAngularVelocity::Execute(), Orders::ChangeHeading::Execute(), LocalCoordinates(), and TargFront().
Definition at line 4059 of file unit_generic.cpp.
References TransformNormal().
Referenced by Orders::FireAt::ChangeLocalDirection().
Definition at line 1615 of file unit_generic.cpp.
References Mount::ACTIVE, weapon_info::AUTOTRACKING, and size.
|
virtual |
Definition at line 8789 of file unit_generic.cpp.
References _Universe, Cockpit::activeStarSystem, StarSystem::AddUnit(), StarSystem::getFileName(), Universe::isPlayerStarship(), Cockpit::visitSystem(), and VSFileSystem::vs_fprintf().
Referenced by StarSystem::ProcessPendingJumps(), and GameUnit< UnitType >::TransferUnitToSystem().
|
virtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 131 of file unit_generic.cpp.
void Unit::TurretFAW | ( | ) |
Definition at line 7907 of file unit_generic.cpp.
References CheckAccessory(), EnqueueAIFirst(), and TurretFAW().
Referenced by FireKeyboard::Execute(), Mount::PhysicsAlignedFire(), Orders::AggressiveAI::ProcessCurrentFgDirective(), and TurretFAW().
Definition at line 6006 of file unit_generic.cpp.
References _Universe, Universe::AccessCockpit(), UniverseUtil::asin(), Universe::CurrentCockpit(), UnitImages< BOGUS >::dockedunits, faction, FreeDockingPort(), VegaConfig::getVariable(), Universe::netLocked(), Network, Cockpit::OnDockEnd(), UnitUtil::owner(), XMLSupport::parse_bool(), XMLSupport::parse_float(), PI, pImage, q, RealPosition(), Rotate(), serial, SERVER, turretcontrol, NetClient::undockRequest(), Vector, Velocity, vs_config, VSFileSystem::vs_dprintf(), and Universe::whichPlayerStarship().
Referenced by buyShip(), BaseInterface::Room::Launch::Click(), BaseInterface::Room::Eject::Click(), Orders::DockingOps::PerformDockingOperations(), and UnDockNow().
void Unit::UnFire | ( | ) |
Definition at line 5388 of file unit_generic.cpp.
References _Universe, Mount::ACTIVE, NetServer::BroadcastUnfire(), Network, SERVER, UnFire(), Mount::UNFIRED, NetClient::unfireRequest(), VSServer, and Universe::whichPlayerStarship().
Referenced by DisableTurretAI(), Orders::TurretAI::Execute(), FireKeyboard::Execute(), Takeoff(), TakeoffEveryZig(), and UnFire().
|
inline |
Definition at line 460 of file unit_generic.h.
References unit_role.
Referenced by TurretBin::AssignTargets(), FireBitmask(), getProperScript(), UnitUtil::isCapitalShip(), Priority(), and ChooseTargetClass< numTuple >::ShouldTargetUnit().
void Unit::unitRole | ( | unsigned char | c) |
|
inline |
void Unit::UnRef | ( | ) |
bool Unit::UpAndDownGrade | ( | const Unit * | up, |
const Unit * | templ, | ||
int | mountoffset, | ||
int | subunitoffset, | ||
bool | touchme, | ||
bool | downgrade, | ||
int | additive, | ||
bool | forcetransaction, | ||
double & | percentage, | ||
const Unit * | downgrade_min, | ||
bool | force_change_on_nothing, | ||
bool | gen_downgrade_list | ||
) |
Definition at line 6923 of file unit_generic.cpp.
References _Universe, a, accelStarHandler, Universe::activeStarSystem(), AddToDowngradeMap(), AddUp(), Unit::Limits::afterburn, afterburnenergy, afterburntype, AGreaterB(), angleStarHandler, armor, b, Armor::backleftbottom, Armor::backlefttop, Armor::backrightbottom, Armor::backrighttop, NetServer::BroadcastCargoUpgrade(), BShieldData(), c, Unit::Computer::RADARLIM::canlock, Unit::Computer::RADARLIM::capability, UnitImages< BOGUS >::cargo, NetClient::cargoRequest(), UnitImages< BOGUS >::CargoVolume, cell_has_recursive_data(), UnitImages< BOGUS >::cloakenergy, UnitImages< BOGUS >::cloakglass, cloaking, cloakmin, UnitImages< BOGUS >::cloakrate, UnitImages< BOGUS >::cockpit_damage, UnitImages< BOGUS >::CommFunctionality, UnitImages< BOGUS >::CommFunctionalityMax, computeAdderPercent(), computeDowngradePercent(), ComputeMinDowngradePercent(), computeMultPercent(), computePercent(), computer, UnitCollection::createIterator(), UnitFactory::createServerSideUnit(), d, Unit::UnitJump::damage, Unit::UnitJump::delay, Unit::UnitJump::drive, UnitImages< BOGUS >::ecm, Shield::efficiency, Unit::UnitJump::energy, UnitImages< BOGUS >::equipment_volume, faction, UnitImages< BOGUS >::fireControlFunctionality, UnitImages< BOGUS >::fireControlFunctionalityMax, float, Unit::Limits::forward, Armor::frontleftbottom, Armor::frontlefttop, Armor::frontrightbottom, Armor::frontrighttop, FShieldData(), fuel, GCCBugCheckFloat(), Universe::getNumActiveStarSystem(), GetsB(), FactionUtil::GetUpgradeFaction(), VegaConfig::getVariable(), graphicOptions, StarSystem::gravitationalUnits(), GreaterZero(), HeatSink, UnitImages< BOGUS >::HiddenCargoVolume, hull, Unit::UnitJump::insysenergy, Unit::Computer::itts, jump, Unit::Limits::lateral, Shield::leak, UnitImages< BOGUS >::LifeSupportFunctionality, UnitImages< BOGUS >::LifeSupportFunctionalityMax, limits, Unit::Computer::RADARLIM::lockcone, LShieldData(), Mass, Unit::Computer::max_combat_ab_speed, Unit::Computer::max_combat_speed, Unit::Computer::max_pitch_down, Unit::Computer::max_pitch_up, Unit::Computer::max_roll_left, Unit::Computer::max_roll_right, Unit::Computer::max_yaw_left, Unit::Computer::max_yaw_right, Unit::Computer::RADARLIM::maxcone, maxenergy, Unit::Computer::RADARLIM::maxrange, MAXVDUS, maxwarpenergy, Unit::graphic_options::MaxWarpMultiplier, Unit::graphic_options::MinWarpMultiplier, Momentofinertia, MultUp(), name, Universe::netLocked(), Network, Shield::number, XMLSupport::parse_bool(), XMLSupport::parse_float(), pImage, Unit::Limits::pitch, UnitCollection::prepend(), Unit::Computer::radar, Shield::recharge, recharge, UnitImages< BOGUS >::repair_droid, Unit::Limits::retro, Unit::Limits::roll, RShieldData(), SERVER, shield, Shield::shield2fb, Shield::shield4fbrl, Shield::shield8, UnitImages< BOGUS >::SPECDriveFunctionality, UnitImages< BOGUS >::SPECDriveFunctionalityMax, specInterdiction, speedStarHandler, STDUPGRADE, STDUPGRADE_SPECIFY_DEFAULTS, STDUPGRADECLAMP, SubtractUp(), Unit::Computer::RADARLIM::trackingcone, UpgradeBoolval(), UPGRADEOK, UnitImages< BOGUS >::UpgradeVolume, Unit::Limits::vertical, vs_config, VSServer, Universe::whichPlayerStarship(), and Unit::Limits::yaw.
Definition at line 4028 of file unit_generic.cpp.
Referenced by Orders::MoveToParent::Execute(), Orders::MatchAngularVelocity::Execute(), Orders::ChangeHeading::Execute(), and Orders::AggressiveAI::ExecuteNoEnemies().
void Unit::UpdateCollideQueue | ( | StarSystem * | ss, |
CollideMap::iterator | hint[NUM_COLLIDE_MAPS] | ||
) |
Definition at line 79 of file unit_collide.cpp.
References activeStarSystem, StarSystem::collidemap, CollideArray::insert(), is_null(), isSubUnit(), location, and NUM_COLLIDE_MAPS.
Referenced by Mission::call_unit_launch(), and Mount::PhysicsAlignedFire().
|
inlinevirtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 538 of file unit_generic.h.
Referenced by GameCockpit::SetupViewPort().
void Unit::UpdatePhysics | ( | const Transformation & | trans, |
const Matrix & | transmat, | ||
const Vector & | CumulativeVelocity, | ||
bool | ResolveLast, | ||
UnitCollection * | uc, | ||
Unit * | superunit | ||
) |
Definition at line 2200 of file unit_generic.cpp.
References _Universe, Mount::ACTIVE, Universe::activeStarSystem(), AUDAdjustSound(), AUDCreateSoundWAV(), AUDIsPlaying(), AUDStartPlaying(), AUDStopPlaying(), weapon_info::AUTOTRACKING, weapon_info::BEAM, CloseEnoughToAutotrack(), Transformation::Compose(), weapon_info::EnergyRate, Mount::FIRED, StarSystem::getCurrentSimFrame(), StarSystem::getFileName(), Cockpit::GetNavSelectedSystem(), UnitUtil::getSignificantDistance(), FactionUtil::GetUpgradeFaction(), VegaConfig::getVariable(), howFarToJump(), Mount::INACTIVE, int, InvTransform(), is_null(), Universe::isPlayerStarship(), isUnit(), StarSystem::JumpTo(), location, m1, UniverseUtil::musicMute(), NearestSystem(), Network, NUM_COLLIDE_MAPS, UnitUtil::owner(), XMLSupport::parse_bool(), XMLSupport::parse_float(), PLANETPTR, Position(), SERVER, SetShieldZero(), SIM_QUEUE_SIZE, SIMULATION_ATOM, size, weapon_info::SPECIALMISSILE, t1(), Target(), Transformation::to_matrix(), weapon_info::type, Mount::UNFIRED, UNIT_BOLT, UpdatePhysics(), Vector, and vs_config.
Referenced by UpdatePhysics(), UpdateSubunitPhysics(), and StarSystem::UpdateUnitPhysics().
|
virtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, GameUnit< Nebula >, Missile, GameMissile, Nebula, Building, GameBuilding, GameAsteroid, and GameNebula.
Definition at line 2765 of file unit_generic.cpp.
References _Universe, Universe::isPlayerStarship(), Network, Rotate(), SERVER, SIMULATION_ATOM, and TransformNormal().
Referenced by Building::UpdatePhysics2(), Nebula::UpdatePhysics2(), and Missile::UpdatePhysics2().
|
virtual |
Definition at line 2519 of file unit_generic.cpp.
References _Universe, Universe::activeStarSystem(), cur_sim_queue_slot, float, StarSystem::getCurrentSimFrame(), UnitUtil::getPhysicsPriority(), last_processed_sqs, sim_atom_multiplier, SIM_QUEUE_SIZE, and SIMULATION_ATOM.
|
virtual |
Definition at line 2573 of file unit_generic.cpp.
References cloaking, int, Target(), and UpdatePhysics().
bool Unit::Upgrade | ( | const Unit * | upgrador, |
int | mountoffset, | ||
int | subunitoffset, | ||
int | additive, | ||
bool | force, | ||
double & | percentage, | ||
const Unit * | templ = NULL , |
||
bool | force_change_on_nothing = false , |
||
bool | gen_downgrade_list = true |
||
) |
Definition at line 6636 of file unit_generic.cpp.
Referenced by BaseComputer::buyUpgrade(), BaseComputer::BuyUpgradeOperation::concludeTransaction(), Enhancement::reactToCollision(), UnitUtil::RecomputeUnitUpgrades(), UnitUtil::upgrade(), GameUnit< UnitType >::Upgrade(), and Upgrade().
|
virtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 6730 of file unit_generic.cpp.
References UnitFactory::createUnit(), StarSystemGent::faction, ClassCache< Typ, Key >::getCachedConst(), UnitUtil::GetCargo(), GetModeFromName(), GetUnitDir(), FactionUtil::GetUpgradeFaction(), Cargo::installed, name, ClassCache< Typ, Key >::setCachedConst(), Upgrade(), and FactionUtil::upgradefac.
|
inlinevirtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 400 of file unit_generic.h.
Referenced by CrashForceDock(), EjectCargo(), PerformDockingOperations(), and TryDock().
bool Unit::UpgradeMounts | ( | const Unit * | up, |
int | subunitoffset, | ||
bool | touchme, | ||
bool | downgrade, | ||
int & | numave, | ||
const Unit * | templ, | ||
double & | percentage | ||
) |
go through all guns
search for right mount to remove starting from j. this is the right name
calculate scrap value (if damaged)
deactivate weapon
deactivate weapon
go through all guns
Definition at line 6332 of file unit_generic.cpp.
References Mount::ACTIVE, Mount::ammo, weapon_info::CAPSHIPHEAVYMISSILE, weapon_info::CAPSHIPLIGHTMISSILE, Mount::DESTROYED, GetNumMounts(), VegaConfig::getVariable(), weapon_info::HEAVYMISSILE, Mount::INACTIVE, int, j, k, weapon_info::LIGHTMISSILE, weapon_info::MEDIUMMISSILE, mounts, name, XMLSupport::parse_bool(), weapon_info::SPECIALMISSILE, Mount::type, Mount::UNCHOSEN, volume, weapon_info::volume, and vs_config.
|
virtual |
Reimplemented in GameUnit< Enhancement >, GameUnit< Asteroid >, GameUnit< Unit >, GameUnit< Missile >, GameUnit< Building >, and GameUnit< Nebula >.
Definition at line 6518 of file unit_generic.cpp.
References CreateGenericTurret().
bool Unit::UpgradeSubUnitsWithFactory | ( | const Unit * | up, |
int | subunitoffset, | ||
bool | touchme, | ||
bool | downgrade, | ||
int & | numave, | ||
double & | percentage, | ||
Unit *(*)(std::string s, int faction) | createupgradesubunit | ||
) |
set the turrets to the offset
Definition at line 6523 of file unit_generic.cpp.
References Unit::Limits::afterburn, UnitFactory::createUnit(), curr_physical_state, faction, Unit::Limits::forward, getTurretSize(), j, Kill(), Unit::Limits::lateral, limits, name, pImage, Unit::Limits::pitch, UnitCollection::UnitIterator::preinsert(), prev_physical_state, UnitCollection::UnitIterator::remove(), Unit::Limits::retro, Unit::Limits::roll, rSize(), SetFaction(), XMLSerializer::setName(), SetRecursiveOwner(), UnitImages< BOGUS >::unitwriter, viewSubUnits(), and Unit::Limits::yaw.
Unit * Unit::VelocityReference | ( | ) |
Definition at line 275 of file unit_generic.cpp.
Referenced by FlyByKeyboard::Execute(), UnitWrapper::GetVelocityReference(), Init(), and GameUnit< UnitType >::TransferUnitToSystem().
void Unit::VelocityReference | ( | Unit * | targ) |
Definition at line 5333 of file unit_generic.cpp.
void Unit::VerticalThrust | ( | float | amt) |
|
inline |
Definition at line 711 of file unit_generic.h.
References computer.
Referenced by UnitUtil::maxAfterburnerSpeed(), UnitUtil::maxSpeed(), and showUnitStats().
un_kiter Unit::viewSubUnits | ( | ) | const |
Definition at line 1838 of file unit_generic.cpp.
Referenced by Radar::CollectRadarTracks::acquire(), AutoPilotToErrorMessage(), UnitUtil::ishere(), and UpgradeSubUnitsWithFactory().
float Unit::WarpCapData | ( | ) | const |
Definition at line 4716 of file unit_generic.cpp.
Referenced by Orders::DockingOps::DockToTarget(), ForceDock(), Planet::InitPlanet(), and showUnitStats().
float Unit::WarpEnergyData | ( | ) | const |
Definition at line 4726 of file unit_generic.cpp.
References float.
Referenced by ActuallyWarpTo(), ForceDock(), and GameCockpit::LookupUnitStat().
void Unit::WriteUnit | ( | const char * | modificationname = "" ) |
Definition at line 1446 of file unit_csv.cpp.
References VSFileSystem::VSFile::Close(), VSFileSystem::CreateDirectoryHome(), csvRow, f, fprintf, VSFileSystem::VSFile::GetFullPath(), getSubUnits(), VegaConfig::getVariable(), name, VSFileSystem::Ok, VSFileSystem::VSFile::OpenCreateWrite(), XMLSupport::parse_bool(), pImage, VSFileSystem::savedunitpath, VSFileSystem::UnitFile, UnitImages< BOGUS >::unitwriter, vs_config, XMLSerializer::Write(), VSFileSystem::VSFile::Write(), and WriteUnitString().
Referenced by GameUniverse::WriteSaveGame(), and WriteSaveGame().
string Unit::WriteUnitString | ( | ) |
Definition at line 1512 of file unit_csv.cpp.
References UniverseUtil::acos(), Unit::Limits::afterburn, afterburnenergy, afterburntype, armor, Armor::backleftbottom, Armor::backlefttop, Armor::backrightbottom, Armor::backrighttop, c, Unit::Computer::RADARLIM::canlock, Unit::Computer::RADARLIM::capability, UnitImages< BOGUS >::CargoVolume, UnitImages< BOGUS >::cloakenergy, UnitImages< BOGUS >::cloakglass, cloaking, cloakmin, UnitImages< BOGUS >::cloakrate, UnitImages< BOGUS >::CommFunctionality, UnitImages< BOGUS >::CommFunctionalityMax, computer, csvRow, Unit::UnitJump::delay, Mount::DESTROYED, Unit::UnitJump::drive, UnitImages< BOGUS >::ecm, Shield::efficiency, Unit::UnitJump::energy, UnitImages< BOGUS >::equipment_volume, filename, UnitImages< BOGUS >::fireControlFunctionality, UnitImages< BOGUS >::fireControlFunctionalityMax, UnitImages< BOGUS >::forcejump, Unit::Limits::forward, fprintf, Armor::frontleftbottom, Armor::frontlefttop, Armor::frontrightbottom, Armor::frontrighttop, fuel, fullname, Cargo::functionality, GetCargo(), Cargo::GetCategory(), Cargo::GetContent(), CSVRow::getKey(), Matrix::getQ(), Matrix::getR(), GetSubUnits(), getSubUnits(), VegaConfig::getVariable(), graphicOptions, HeatSink, UnitImages< BOGUS >::HiddenCargoVolume, hull, i, Cargo::installed, Unit::UnitJump::insysenergy, isTractorable(), Unit::Computer::itts, j, jump, k, Unit::Limits::lateral, Shield::leak, UnitImages< BOGUS >::LifeSupportFunctionality, UnitImages< BOGUS >::LifeSupportFunctionalityMax, limits, Unit::Computer::RADARLIM::lockcone, lookupMountSize(), mapToStringVec(), Cargo::mass, Mass, Unit::Computer::max_combat_ab_speed, Unit::Computer::max_combat_speed, Unit::Computer::max_pitch_down, Unit::Computer::max_pitch_up, Unit::Computer::max_roll_left, Unit::Computer::max_roll_right, Unit::Computer::max_yaw_left, Unit::Computer::max_yaw_right, Unit::Computer::RADARLIM::maxcone, maxenergy, Cargo::maxfunctionality, Unit::Computer::RADARLIM::maxrange, maxwarpenergy, Unit::graphic_options::MaxWarpMultiplier, Unit::graphic_options::MinWarpMultiplier, Cargo::mission, Momentofinertia, mounts, name, Shield::number, numCargo(), Matrix::p, XMLSupport::parse_bool(), XMLSupport::parse_float(), pImage, Unit::Limits::pitch, Position(), Cargo::price, Cargo::quantity, Unit::Computer::radar, Shield::recharge, recharge, UnitImages< BOGUS >::repair_droid, Unit::Limits::retro, Unit::Limits::roll, shield, Shield::shield2fb, Shield::shield4fbrl, Shield::shield8, size, CSVRow::size(), Unit::Computer::slide_end, Unit::Computer::slide_start, UnitImages< BOGUS >::SPECDriveFunctionality, UnitImages< BOGUS >::SPECDriveFunctionalityMax, specInterdiction, stof(), Transformation::to_matrix(), tos(), XMLSupport::tostring(), Unit::Computer::RADARLIM::trackingcone, tractorIn, tractorPush, Mount::UNCHOSEN, unitTables, UnitImages< BOGUS >::unitwriter, UnitImages< BOGUS >::UpgradeVolume, Unit::Limits::vertical, volume, Cargo::volume, vs_config, VS_PI, writeCSV(), WriteHudDamage(), WriteHudDamageFunc(), XMLSerializer::WriteString(), and Unit::Limits::yaw.
Referenced by NavigationSystem::DrawShip(), SaveNetUtil::GetSaveStrings(), BaseComputer::showShipStats(), and WriteUnit().
void Unit::YawTorque | ( | float | amt) |
|
friend |
Definition at line 479 of file unit_generic.h.
|
friend |
Definition at line 442 of file unit_generic.h.
|
friend |
Definition at line 478 of file unit_generic.h.
|
friend |
Definition at line 279 of file unit_generic.h.
|
friend |
Definition at line 483 of file unit_generic.h.
|
friend |
Definition at line 481 of file unit_generic.h.
StarSystem* Unit::activeStarSystem |
Definition at line 502 of file unit_generic.h.
Referenced by StarSystem::AddUnit(), Mission::call_unit_launch(), CollideMap::CheckCollisions(), CollideMap::CheckUnitCollisions(), UnitUtil::getPhysicsPriority(), Init(), StarSystem::ProcessPendingJumps(), RemoveFromSystem(), Target(), and UpdateCollideQueue().
|
protected |
Definition at line 813 of file unit_generic.h.
Referenced by AfterburnData(), Init(), LoadRow(), UpAndDownGrade(), and WriteUnitString().
|
protected |
Definition at line 814 of file unit_generic.h.
Referenced by LoadRow(), UpAndDownGrade(), and WriteUnitString().
Order* Unit::aistate |
Definition at line 1305 of file unit_generic.h.
Referenced by Pilot::adjustSpecificRelationship(), Arrested(), DisableTurretAI(), EjectCargo(), Orders::AggressiveAI::ExecuteNoEnemies(), getAIState(), Init(), UnitUtil::performDockingOperations(), Orders::DockingOps::RestoreOldAI(), RollLeft(), RollLeftHard(), RollRight(), RollRightHard(), SetTurretAI(), and Unit().
Vector Unit::AngularVelocity |
Definition at line 799 of file unit_generic.h.
Referenced by ClientState::ClientState(), GetAngularVelocity(), Init(), PerformDockingOperations(), and ClientState::setUnitState().
Armor Unit::armor |
Definition at line 1138 of file unit_generic.h.
Referenced by ZoneMgr::addDamage(), Init(), LoadRow(), SelfDestruct(), showUnitStats(), UpAndDownGrade(), and WriteUnitString().
|
protected |
Definition at line 474 of file unit_generic.h.
Referenced by attackPreference(), and Init().
bool Unit::autopilotactive |
Definition at line 353 of file unit_generic.h.
Referenced by Orders::AutoDocking::EndState(), FlyByKeyboard::Execute(), Orders::AutoLongHaul::Execute(), Init(), and GameCockpit::LookupUnitStat().
int Unit::cloaking |
Definition at line 856 of file unit_generic.h.
Referenced by ZoneMgr::addDamage(), CloakVisible(), Init(), LoadRow(), GameCockpit::LookupUnitStat(), showUnitStats(), UpAndDownGrade(), UpdateSubunitPhysics(), and WriteUnitString().
int Unit::cloakmin |
Definition at line 858 of file unit_generic.h.
Referenced by ZoneMgr::addDamage(), Init(), LoadRow(), GameCockpit::LookupUnitStat(), UpAndDownGrade(), and WriteUnitString().
struct collideTrees* Unit::colTrees |
Definition at line 1351 of file unit_generic.h.
Referenced by ContinuousTerrain::Collide(), Collide(), Init(), Planet::InitPlanet(), InsideCollideTree(), LaunchOneParticle(), LoadRow(), and rayCollide().
class Unit::Computer Unit::computer |
Referenced by ActuallyWarpTo(), ZoneMgr::addDamage(), GameUnit< UnitType >::Draw(), GameCockpit::Draw(), UnitUtil::getECM(), Init(), LoadRow(), GameCockpit::LookupUnitStat(), Nearby(), ResetThreatLevel(), TargetLocked(), NetClient::targetRequest(), UpAndDownGrade(), useJitteryAutopilot(), ViewComputerData(), and WriteUnitString().
Vector Unit::corner_max |
Definition at line 870 of file unit_generic.h.
Referenced by calculate_extent(), Init(), LoadRow(), and Planet::Planet().
Vector Unit::corner_min |
Definition at line 870 of file unit_generic.h.
Referenced by calculate_extent(), Init(), LoadRow(), and Planet::Planet().
|
protected |
Definition at line 227 of file unit_generic.h.
Referenced by LoadRow(), WriteUnit(), and WriteUnitString().
Transformation Unit::cumulative_transformation |
Definition at line 787 of file unit_generic.h.
Referenced by GameStarSystem::Draw(), Init(), Planet::InitPlanet(), Mount::PhysicsAlignedFire(), Position(), SetPosAndCumPos(), and StarSystem::UpdateUnitPhysics().
Matrix Unit::cumulative_transformation_matrix |
Definition at line 785 of file unit_generic.h.
Referenced by ActuallyWarpTo(), CanFaceTarget(), ContinuousTerrain::Collide(), cosAngleTo(), dockingdistance(), Orders::AutoLongHaul::Execute(), Orders::LoopAround::Execute(), Orders::LoopAroundAgro::Execute(), Orders::FacePerpendicular::Execute(), GetTransformation(), Init(), InsideCollideTree(), Mount::PhysicsAlignedFire(), querySphere(), querySphereNoRecurse(), rayCollide(), SetPosAndCumPos(), and Planet::~Planet().
Vector Unit::cumulative_velocity |
Definition at line 789 of file unit_generic.h.
Referenced by AddVelocity(), PlanetaryOrbit::Execute(), Orders::FaceTargetITTS::Execute(), Orders::LoopAround::Execute(), GetVelocity(), GetWarpVelocity(), Init(), and GameCockpit::LookupUnitStat().
unsigned int Unit::cur_sim_queue_slot |
Definition at line 775 of file unit_generic.h.
Referenced by GameStarSystem::Draw(), GameUnit< UnitType >::Draw(), UnitDrawer::draw(), Init(), and UpdateSubunitPhysics().
Transformation Unit::curr_physical_state |
Definition at line 773 of file unit_generic.h.
Referenced by buyShip(), CarSimUpdate(), ClientState::ClientState(), CloseEnoughToAutotrack(), DockToSavedBases(), GameStarSystem::Draw(), GameCockpit::Draw(), GameUnit< UnitType >::DrawNow(), Init(), Prediction::InitInterpolation(), Planet::InitPlanet(), NetClient::Interpolate(), LocalPosition(), UnitFactory::parseMissileBuffer(), UnitFactory::parseUnitBuffer(), PerformDockingOperations(), Mount::PhysicsAlignedFire(), SetCurPosition(), ClientState::setUnitState(), StarSystem::UpdateUnitPhysics(), and UpgradeSubUnitsWithFactory().
unsigned short Unit::damages |
Definition at line 302 of file unit_generic.h.
Referenced by ZoneMgr::addDamage(), ZoneMgr::addPosition(), ZoneMgr::broadcastDamage(), ZoneMgr::broadcastSnapshots(), and Init().
bool Unit::do_subunit_scheduling |
Definition at line 779 of file unit_generic.h.
Referenced by Init(), and RecursiveSetSchedule().
unsigned char Unit::docked |
Definition at line 1424 of file unit_generic.h.
Referenced by CanDockWithMe(), DockedOrDocking(), ForceDock(), Init(), isDocked(), and isDockedAtAll().
float Unit::energy |
Definition at line 1143 of file unit_generic.h.
Referenced by ZoneMgr::addPosition(), Init(), LoadRow(), and Mount::PhysicsAlignedFire().
int Unit::faction |
Definition at line 1460 of file unit_generic.h.
Referenced by UnitFactory::addAsteroidBuffer(), UnitFactory::addMissileBuffer(), UnitFactory::addNebulaBuffer(), StarSystem::Statistics::AddUnit(), UnitFactory::addUnitBuffer(), UniverseUtil::AdjustRelation(), CommunicatingAI::AdjustRelationTo(), AllUnitsCloseAndEngage(), ApplyDamage(), Arrested(), BaseInterface::BaseInterface(), Planet::beginElement(), buyShip(), StarSystem::Statistics::CheckVitals(), ChooseNavPoint(), BaseInterface::Room::Launch::Click(), Beam::Collide(), BaseComputer::constructControls(), cosAngleTo(), createObjects(), CommunicatingAI::Destroy(), Pilot::DoHit(), WarpTrail::Draw(), drawlistitem(), EjectCargo(), Orders::TurretAI::Execute(), Orders::AggressiveAI::Execute(), FlyByKeyboard::Execute(), FireKeyboard::Execute(), ForceDock(), getAutoRSize(), BaseComputer::getColorForGroup(), Pilot::getCommFace(), UnitUtil::getFactionIndex(), UnitUtil::getFactionName(), UnitUtil::getFactionRelation(), UnitUtil::getPhysicsPriority(), getProperScript(), UniverseUtil::GetRelation(), UnitUtil::getRelationFromFaction(), UnitUtil::getRelationToFaction(), SaveNetUtil::GetSaveStrings(), HelpOut(), Radar::Track::IdentifyType(), CommunicatingAI::InitiateContrabandSearch(), Planet::InitPlanet(), isPlayerFaction(), FireKeyboard::JoinFg(), LoadRow(), UnitUtil::orbit(), UnitUtil::PercentOperational(), Mount::PhysicsAlignedFire(), CommunicatingAI::ProcessCommMessage(), Orders::AggressiveAI::ProcessCurrentFgDirective(), CommunicatingAI::RandomInitiateCommunication(), Enhancement::reactToCollision(), reactToCollision(), BaseComputer::recalcTitle(), StarSystem::Statistics::RemoveUnit(), ScoreKill(), Pilot::SetComm(), Cockpit::SetParent(), BaseComputer::BuyUpgradeOperation::start(), BaseComputer::SellUpgradeOperation::start(), UniverseUtil::StopTargettingEachOther(), UnitUtil::switchFg(), UniverseUtil::TargetEachOther(), TargUn(), CommunicatingAI::TerminateContrabandSearch(), UnDock(), Unit(), UpAndDownGrade(), CommunicatingAI::UpdateContrabandSearch(), UpgradeAllowed(), and UpgradeSubUnitsWithFactory().
StringPool::Reference Unit::filename |
Definition at line 233 of file unit_generic.h.
Referenced by WriteUnitString().
|
protected |
Definition at line 1454 of file unit_generic.h.
Referenced by getFlightgroup(), and Init().
|
protected |
Definition at line 1456 of file unit_generic.h.
Referenced by getFgSubnumber(), and Init().
|
protected |
Definition at line 812 of file unit_generic.h.
Referenced by GetMass(), GetMoment(), Init(), LoadRow(), UpAndDownGrade(), and WriteUnitString().
|
protected |
Definition at line 1496 of file unit_generic.h.
Referenced by UnitFactory::addUnitBuffer(), getFullname(), Planet::InitPlanet(), LoadRow(), UnitFactory::parseMissileBuffer(), UnitFactory::parseUnitBuffer(), setFullname(), and WriteUnitString().
class Unit::graphic_options Unit::graphicOptions |
Referenced by ActivateAnimation(), ActuallyWarpTo(), AddSubUnits(), AutoPilotToErrorMessage(), CalculateNearestWarpUnit(), ClientState::ClientState(), FlyByKeyboard::Execute(), Orders::AutoLongHaul::Execute(), FireKeyboard::Execute(), Orders::AggressiveAI::ExecuteNoEnemies(), ExecuteRequestClearenceKey(), UnitUtil::getPhysicsPriority(), Init(), Prediction::InitInterpolation(), InsideCollideTree(), isSubUnit(), jumpReactToCollision(), LoadRow(), GameCockpit::LookupUnitStat(), Orders::AggressiveAI::ProcessLogicItem(), querySphere(), rayCollide(), ResetThreatLevel(), NetClient::sendPosition(), Orders::AggressiveAI::SetParent(), ClientState::setUnitState(), TryDock(), Unit(), UpAndDownGrade(), Missile::UpdatePhysics2(), useJitteryAutopilot(), WarpToP(), and WriteUnitString().
float Unit::gunrange |
Definition at line 349 of file unit_generic.h.
float Unit::gunspeed |
Definition at line 348 of file unit_generic.h.
float Unit::HeatSink |
Definition at line 807 of file unit_generic.h.
Referenced by Init(), LoadRow(), UpAndDownGrade(), and WriteUnitString().
float Unit::hull |
Definition at line 1141 of file unit_generic.h.
Referenced by ZoneMgr::addDamage(), GamePlanet::AddFog(), UniverseUtil::PythonUnitIter::current(), BaseComputer::draw(), Orders::TurretAI::Execute(), GetHull(), GetHullPercent(), ZoneMgr::getZoneBuffer(), Init(), Planet::InitPlanet(), InsideCollideTree(), LoadRow(), GameMissile::reactToCollision(), Missile::reactToCollision(), SelfDestruct(), UnitUtil::SetHull(), GameUnit< UnitType >::Split(), Unit(), UpAndDownGrade(), GameMissile::UpdatePhysics2(), Missile::UpdatePhysics2(), and WriteUnitString().
bool Unit::inertialmode |
Definition at line 351 of file unit_generic.h.
Referenced by FlyByWire::InertialFlight(), Init(), and GameCockpit::LookupUnitStat().
|
protected |
Definition at line 866 of file unit_generic.h.
Referenced by Init().
struct Unit::UnitJump Unit::jump |
bool Unit::killed |
Definition at line 8 of file unit.h.
Referenced by CollideAll(), Init(), Planet::InitPlanet(), Kill(), Killed(), GameMissile::reactToCollision(), Missile::reactToCollision(), UnRef(), and ~Unit().
unsigned int Unit::last_processed_sqs |
Definition at line 777 of file unit_generic.h.
Referenced by Init(), and UpdateSubunitPhysics().
class Unit::Limits Unit::limits |
CollideMap::iterator Unit::location[2] |
Definition at line 1350 of file unit_generic.h.
Referenced by ChooseTargetClass< numTuple >::acquire(), CalculateNearestWarpUnit(), Mission::call_unit_launch(), ChooseNearNavPoint(), CollideAll(), CollideChecker< T, canbebolt >::endAfterCollide(), Radar::Sensor::FindTracksInRange(), UniverseUtil::getUnitByPtr(), Init(), ChooseTargetClass< numTuple >::init(), Mount::PhysicsAlignedFire(), RemoveFromSystem(), StarSystem::RemoveUnit(), GameUnit< UnitType >::TransferUnitToSystem(), UpdateBackpointers< Unit::UNIT_ONLY >::updateBackpointer(), UpdateCollideQueue(), and UpdatePhysics().
float Unit::Mass |
Definition at line 806 of file unit_generic.h.
Referenced by NetServer::addUnitCargoSnapshot(), EjectCargo(), GetMass(), Init(), Planet::InitPlanet(), LoadRow(), GameCockpit::LookupUnitStat(), makeBlankUpgrade(), massSerializer(), GameUnit< UnitType >::Split(), UpAndDownGrade(), and WriteUnitString().
|
protected |
Definition at line 1158 of file unit_generic.h.
Referenced by Init(), LoadRow(), MaxEnergyData(), RepairUpgrade(), UpAndDownGrade(), and WriteUnitString().
|
protected |
Definition at line 1151 of file unit_generic.h.
Referenced by GameMissile::GameMissile(), GetHullPercent(), Init(), LoadRow(), Missile::Missile(), and Unit().
|
protected |
Definition at line 1160 of file unit_generic.h.
Referenced by Init(), Planet::InitPlanet(), LoadRow(), UpAndDownGrade(), and WriteUnitString().
std::vector< Mesh* > Unit::meshdata |
Definition at line 454 of file unit_generic.h.
Referenced by Planet::AddSpaceElevator(), MeshAnimation::AnimationStep(), getCollideTree(), LoadRow(), nummesh(), Planet::Planet(), querySphere(), querySphereNoRecurse(), GameUnit< UnitType >::Split(), Unit(), GameNebula::UpdatePhysics2(), and ~Unit().
float Unit::missilerange |
Definition at line 350 of file unit_generic.h.
|
protected |
Definition at line 817 of file unit_generic.h.
Referenced by GetMoment(), Init(), LoadRow(), UpAndDownGrade(), and WriteUnitString().
std::vector< Mount > Unit::mounts |
Definition at line 347 of file unit_generic.h.
Referenced by NetClient::AddClientObject(), ZoneMgr::addDamage(), AddMounts(), WeaponComparator< FORWARD >::checkmount(), computeLockingPercent(), disableSubUnits(), FireKeyboard::Execute(), GetNumMounts(), mountSerializer(), UnitUtil::PercentOperational(), RemoveFromSystem(), UnitUtil::removeWeapon(), RepairUpgradeCargo(), BaseComputer::BuyUpgradeOperation::selectMount(), BaseComputer::SellUpgradeOperation::selectMount(), showUnitStats(), WeaponComparator< FORWARD >::ToggleWeaponSet(), UpgradeMounts(), WriteUnitString(), and ~Unit().
StringPool::Reference Unit::name |
Definition at line 232 of file unit_generic.h.
Referenced by BaseComputer::actionConfirmedSaveGame(), NetClient::AddClientObject(), UnitFactory::addMissileBuffer(), NetClient::AddObjects(), ZoneMgr::addPosition(), UnitFactory::addUnitBuffer(), Arrested(), BaseInterface::BaseInterface(), buildCargoDescription(), CheckAccessory(), BaseInterface::Room::Launch::Click(), BaseInterface::Room::Eject::Click(), Beam::Collide(), displayUnitInfo(), GameCockpit::DoAutoLanding(), DockToSavedBases(), DoSpeech(), EjectCargo(), FireKeyboard::Execute(), Orders::AggressiveAI::ExecuteNoEnemies(), FilterDowngradeList(), Pilot::getAnger(), UnitUtil::getName(), getProperScript(), getUnitFromUpgradeName(), getUnitNameAndFgNoBase(), MeshAnimation::Init(), Planet::InitPlanet(), CockpitKeys::Inside(), UnitUtil::isAsteroid(), GameCockpit::LookupUnitStat(), makeFinalBlankUpgrade(), makeMasterPartList(), makeTemplateUpgrade(), MakeUnitXMLPretty(), UnitFactory::parseMissileBuffer(), UnitFactory::parseUnitBuffer(), UnitUtil::PercentOperational(), GamePlanet::reactToCollision(), BaseComputer::recalcTitle(), Orders::AggressiveAI::ReCommandWing(), ReduceToTemplate(), Repair(), RepairUpgrade(), setFullname(), UnitUtil::setName(), showUnitStats(), GameUnit< UnitType >::Split(), BaseComputer::BuyUpgradeOperation::start(), BaseComputer::SellUpgradeOperation::start(), subunitSerializer(), SwapInNewShipName(), UnitUtil::switchFg(), TargSig(), UpAndDownGrade(), Cockpit::Update(), Upgrade(), UpgradeAllowed(), GameUnit< UnitType >::UpgradeInterface(), UpgradeMounts(), UpgradeSubUnitsWithFactory(), WriteUnit(), WriteUnitString(), and ~Unit().
|
protected |
Definition at line 476 of file unit_generic.h.
Referenced by GetNebula(), and Init().
|
protected |
Definition at line 294 of file unit_generic.h.
Vector Unit::NetForce |
Definition at line 791 of file unit_generic.h.
Referenced by Orders::AggressiveAI::Execute(), Init(), and PerformDockingOperations().
Vector Unit::NetLocalForce |
Definition at line 793 of file unit_generic.h.
Referenced by Orders::AggressiveAI::Execute(), Init(), and PerformDockingOperations().
Vector Unit::NetLocalTorque |
Definition at line 797 of file unit_generic.h.
Referenced by Init(), PerformDockingOperations(), and GameBuilding::UpdatePhysics2().
Vector Unit::NetTorque |
Definition at line 795 of file unit_generic.h.
Referenced by Init(), and PerformDockingOperations().
|
protected |
Definition at line 292 of file unit_generic.h.
Referenced by Init().
ClientState Unit::old_state |
Definition at line 296 of file unit_generic.h.
Referenced by NetClient::AddClientObject(), and Prediction::InitInterpolation().
void* Unit::owner |
Definition at line 765 of file unit_generic.h.
Referenced by Radar::CollectRadarTracks::acquire(), ApplyDamage(), BaseInterface::Room::Launch::Click(), Beam::Collide(), Collide(), Missile::Discharge(), UnitDrawer::draw(), EjectCargo(), Orders::TurretAI::Execute(), UnitUtil::getPhysicsPriority(), Init(), ChooseTargetClass< numTuple >::init(), CockpitKeys::Inside(), isNotTurretOwner(), Mount::PhysicsAlignedFire(), Orders::AggressiveAI::ProcessCurrentFgDirective(), reactToCollision(), Orders::DockingOps::SetParent(), Orders::FormUpToOwner::SetParent(), TargUn(), Threaten(), GameUnit< UnitType >::Thrust(), and Cockpit::Update().
Pilot* Unit::pilot |
Definition at line 702 of file unit_generic.h.
Referenced by CommunicatingAI::AdjustRelationTo(), ApplyDamage(), UnitUtil::communicateTo(), CommunicatingAI::Destroy(), FireKeyboard::Execute(), CommunicatingAI::InitiateContrabandSearch(), CommunicatingAI::ProcessCommMessage(), CommunicatingAI::RandomInitiateCommunication(), ScoreKill(), CommunicatingAI::selectCommunicationMessage(), CommunicatingAI::selectCommunicationMessageMood(), NetServer::sendCommunication(), CommunicatingAI::TerminateContrabandSearch(), TryDock(), Unit(), CommunicatingAI::UpdateContrabandSearch(), and ~Unit().
UnitImages< void >* Unit::pImage |
Definition at line 802 of file unit_generic.h.
Referenced by AddCarg(), ZoneMgr::addDamage(), AddDocks(), Planet::AddSpaceElevator(), NetServer::addUnitCargoSnapshot(), BuyCargo(), CanDockWithMe(), cargoSerializer(), Dock(), DockToSavedBases(), BaseInterface::Draw(), EndRequestClearance(), ForceDock(), Pilot::getAnger(), UnitUtil::getECM(), getShipList(), ImportCargo(), Init(), Planet::InitPlanet(), IsExploding(), jumpReactToCollision(), LoadCockpit(), LoadRow(), massSerializer(), BaseComputer::sellSelectedCargo(), showUnitStats(), SortCargo(), GameUnit< UnitType >::Split(), subunitSerializer(), UnDock(), Unit(), UpAndDownGrade(), UpgradeSubUnitsWithFactory(), WriteHudDamage(), WriteHudDamageFunc(), WriteUnit(), WriteUnitString(), and ~Unit().
MeshAnimation* Unit::pMeshAnimation |
Definition at line 1561 of file unit_generic.h.
Referenced by ~Unit().
unsigned int Unit::predicted_priority |
Definition at line 769 of file unit_generic.h.
Referenced by CloseEnoughToNavOrDest(), PlanetaryOrbit::Execute(), Init(), StarSystem::RequestPhysics(), and StarSystem::UpdateUnitPhysics().
Transformation Unit::prev_physical_state |
Definition at line 771 of file unit_generic.h.
Referenced by buyShip(), CloseEnoughToAutotrack(), GameStarSystem::Draw(), PlanetaryOrbit::Execute(), Init(), Planet::InitPlanet(), PerformDockingOperations(), Mount::PhysicsAlignedFire(), and UpgradeSubUnitsWithFactory().
float Unit::radial_size |
Definition at line 860 of file unit_generic.h.
Referenced by Radar::CollectRadarTracks::acquire(), Collide(), UnitUtil::getPhysicsPriority(), Planet::Planet(), Orders::AggressiveAI::ProcessCurrentFgDirective(), querySphere(), reactToCollision(), and rSize().
|
protected |
Definition at line 1155 of file unit_generic.h.
Referenced by EnergyRechargeData(), Init(), LoadRow(), RepairUpgrade(), UpAndDownGrade(), and WriteUnitString().
bool Unit::resolveforces |
Definition at line 930 of file unit_generic.h.
Referenced by Init().
|
protected |
Definition at line 818 of file unit_generic.h.
Referenced by GetAcceleration().
enum Unit::schedulepriorityenum Unit::schedule_priority |
Referenced by UnitUtil::getPhysicsPriority(), Init(), and RecursiveSetSchedule().
bool Unit::selected |
Definition at line 703 of file unit_generic.h.
Referenced by Init().
|
protected |
Definition at line 293 of file unit_generic.h.
Referenced by Dock(), GetSerial(), and UnDock().
Shield Unit::shield |
Definition at line 1139 of file unit_generic.h.
Referenced by ZoneMgr::addDamage(), Planet::AddSpaceElevator(), FireKeyboard::Execute(), Init(), LoadRow(), GameCockpit::LookupUnitStat(), Planet::Planet(), Enhancement::reactToCollision(), RepairUpgrade(), SetShieldZero(), ShieldRechargeData(), shieldSerializer(), showUnitStats(), UpAndDownGrade(), Cockpit::Update(), and WriteUnitString().
|
protected |
Definition at line 810 of file unit_generic.h.
Referenced by Init().
unsigned int Unit::sim_atom_multiplier |
Definition at line 767 of file unit_generic.h.
Referenced by Beam::Collide(), GameStarSystem::Draw(), GameUnit< UnitType >::Draw(), UnitDrawer::draw(), Init(), reactToCollision(), UpdateSubunitPhysics(), and StarSystem::UpdateUnitPhysics().
UnitSounds* Unit::sound |
Definition at line 229 of file unit_generic.h.
Referenced by AddSounds(), Init(), Unit(), and ~Unit().
float Unit::specInterdiction |
Definition at line 804 of file unit_generic.h.
Referenced by StarSystem::AddUnit(), CalculateNearestWarpUnit(), Init(), LoadRow(), UpAndDownGrade(), useJitteryAutopilot(), and WriteUnitString().
UnitCollection Unit::SubUnits |
Definition at line 336 of file unit_generic.h.
Referenced by Planet::AddSpaceElevator(), AddSubUnits(), DealDamageToHullReturnArmor(), Radar::Track::HasTurrets(), Planet::InitPlanet(), InsideCollideTree(), querySphere(), rayCollide(), RecursiveSetSchedule(), Repair(), and GameUnit< UnitType >::UpgradeSubUnits().
|
protected |
Definition at line 1218 of file unit_generic.h.
char Unit::turretstatus |
Definition at line 352 of file unit_generic.h.
Referenced by Init(), and GameCockpit::LookupUnitStat().
int Unit::ucref |
|
protected |
Definition at line 475 of file unit_generic.h.
Referenced by Init(), and unitRole().
Vector Unit::Velocity |
Definition at line 800 of file unit_generic.h.
Referenced by aim_assist(), BaseInterface::Room::Eject::Click(), ClientState::ClientState(), Collide(), GameCockpit::Draw(), PlanetaryOrbit::Execute(), Orders::AggressiveAI::Execute(), UnitUtil::getPhysicsPriority(), Init(), Prediction::InitInterpolation(), PerformDockingOperations(), Mount::PhysicsAlignedFire(), Missile::reactToCollision(), ClientState::setUnitState(), UnDock(), and Missile::UpdatePhysics2().
|
protected |
Definition at line 1162 of file unit_generic.h.
Referenced by GetWarpEnergy(), Init(), jumpReactToCollision(), and LoadRow().
XML* Unit::xml |
Definition at line 726 of file unit_generic.h.
bool Unit::zapped |