|
UFO: Alien Invasion
|
UFOs on geoscape. More...
#include "../../cl_shared.h"#include "cp_campaign.h"#include "cp_geoscape.h"#include "cp_ufo.h"#include "cp_aircraft.h"#include "cp_mapfightequip.h"#include "cp_missions.h"#include "cp_ufo_callbacks.h"
Go to the source code of this file.
Functions | |
| aircraft_t * | UFO_GetNext (aircraft_t *lastUFO) |
| Iterates through the UFOs. | |
| aircraft_t * | UFO_GetNextOnGeoscape (aircraft_t *lastUFO) |
| aircraft_t * | UFO_GetByIDX (const int idx) |
| returns the UFO on the geoscape with a certain index | |
| const technology_t * | UFO_GetTechnologyFromType (const ufoType_t type) |
| Get the technology for a given UFO type. | |
| const aircraft_t * | UFO_GetByType (const ufoType_t type) |
| Get the aircraft template for a given UFO type. | |
| bool | UFO_ShouldAppearOnGeoscape (const ufoType_t type) |
| Some UFOs may only appear if after some interest level in the current running campaign is reached. | |
| bool | UFO_CanDoMission (const ufoType_t uType, const char *mType) |
| Check if the UFO type is available for the given mission type. | |
| int | UFO_GetAvailableUFOsForMission (const interestCategory_t missionType, ufoType_t *ufoTypes, bool checkInterest) |
| Fill an array with available UFOs for the mission type. | |
| int | UFO_GetOneAvailableUFOForMission (const interestCategory_t missionType, bool checkInterest) |
| Get a suitable UFO for the mission type. | |
| const char * | UFO_TypeToName (const ufoType_t type) |
| Translate UFO type to name. | |
| const char * | UFO_GetName (const aircraft_t *ufocraft) |
| Returns name of the UFO if UFO has been researched. | |
| void | UFO_SetRandomDest (aircraft_t *ufocraft) |
| Give a random destination to the given UFO, and make him to move there. | |
| void | UFO_SetRandomDestAround (aircraft_t *ufocraft, const vec2_t pos) |
| Give a random destination to the given UFO close to a position, and make him to move there. | |
| static void | UFO_SetRandomPos (aircraft_t *ufocraft) |
| Give a random position to the given UFO. | |
| static int | UFO_IsTargetOfBase (const aircraft_t *ufo, const base_t *base) |
| Check if a UFO is the target of a base. | |
| static int | UFO_IsTargetOfInstallation (const aircraft_t *ufo, const installation_t *installation) |
| Check if a UFO is the target of an installation. | |
| static void | UFO_UpdateAlienInterestForOneBase (const aircraft_t *ufo, base_t *base) |
| Update alien interest for one PHALANX base. | |
| static void | UFO_UpdateAlienInterestForOneInstallation (const aircraft_t *ufo, installation_t *installation) |
| Update alien interest for one PHALANX installation (radar tower, SAM, ...). | |
| void | UFO_UpdateAlienInterestForAllBasesAndInstallations (void) |
| Update alien interest for all PHALANX bases. | |
| static void | UFO_SearchAircraftTarget (const campaign_t *campaign, aircraft_t *ufo, float maxDetectionRange=MAX_DETECTING_RANGE) |
| Check if the ufo can shoot at a PHALANX aircraft and whether it should follow another ufo. | |
| bool | UFO_SendPursuingAircraft (aircraft_t *ufo, aircraft_t *aircraft) |
| Make the specified UFO pursue a phalanx aircraft. | |
| void | UFO_SendToDestination (aircraft_t *ufo, const vec2_t dest) |
| Make the specified UFO go to destination. | |
| void | UFO_CheckShootBack (const campaign_t *campaign, aircraft_t *ufo, aircraft_t *phalanxAircraft) |
| Check if the ufo can shoot back at phalanx aircraft. | |
| void | UFO_CampaignRunUFOs (const campaign_t *campaign, int deltaTime) |
| Make the UFOs run. | |
| const aircraft_t * | UFO_GetTemplate (ufoType_t ufoType) |
| Get the template data for the given ufo type. | |
| static const aircraft_t * | UFO_GetTemplateForGeoscape (ufoType_t ufoType) |
| Get the template data for the given ufo type. | |
| aircraft_t * | UFO_CreateFromTemplate (const aircraft_t *ufoTemplate) |
| Creates a new ufo on the geoscape from the given aircraft template. | |
| aircraft_t * | UFO_AddToGeoscape (ufoType_t ufoType, const vec2_t destination, mission_t *mission) |
| Add a UFO to geoscape. | |
| void | UFO_RemoveFromGeoscape (aircraft_t *ufo) |
| Remove the specified ufo from geoscape. | |
| void | UFO_DetectNewUFO (aircraft_t *ufocraft) |
| Perform actions when a new UFO is detected. | |
| bool | UFO_CampaignCheckEvents (void) |
| Check events for UFOs: Appears or disappears on radars. | |
| void | UFO_NotifyPhalanxAircraftRemoved (const aircraft_t *const aircraft) |
| Notify to UFOs that a Phalanx aircraft has been destroyed. | |
| bool | UFO_IsUFOSeenOnGeoscape (const aircraft_t *ufo) |
| Check if an aircraft should be seen on geoscape. | |
| void | UFO_InitStartup (void) |
| Init actions for ufo-subsystem. | |
| void | UFO_Shutdown (void) |
| Closing actions for ufo-subsystem. | |
Variables | |
| static const float | MAX_DETECTING_RANGE = 25.0f |
| static const cmdList_t | ufoDebugCallbacks [] |
UFOs on geoscape.
Definition in file cp_ufo.cpp.
| aircraft_t * UFO_AddToGeoscape | ( | ufoType_t | ufoType, |
| const vec2_t | destination, | ||
| mission_t * | mission ) |
Add a UFO to geoscape.
| [in] | ufoType | The type of ufo (fighter, scout, ...). |
| [in] | destination | Position where the ufo should go. nullptr is randomly chosen |
| [in] | mission | Pointer to the mission the UFO is involved in |
Definition at line 773 of file cp_ufo.cpp.
References AII_ReloadAircraftWeapons(), AII_UpdateAircraftStats(), AIR_STATS_DAMAGE, aircraft_t::damage, aircraft_t::detected, aircraft_t::landed, aircraft_t::mission, aircraft_t::stats, UFO_CreateFromTemplate(), UFO_GetTemplateForGeoscape(), UFO_SendToDestination(), UFO_SetRandomDest(), and UFO_SetRandomPos().
Referenced by CP_MissionBegin(), CP_SupplyMissionCreate(), TEST_F(), and TEST_F().
| bool UFO_CampaignCheckEvents | ( | void | ) |
Check events for UFOs: Appears or disappears on radars.
Definition at line 867 of file cp_ufo.cpp.
References _, AIR_AircraftsUFODisappear(), AIR_Foreach, AIR_IsAircraftOnGeoscape(), aircraft_t::aircraftTarget, B_GetBuildingStatus(), B_GetNext(), B_POWER, aircraft_t::detected, GEO_NotifyUFODisappear(), GetDistanceOnGlobe(), INS_Foreach, aircraft_t::landed, MAX_VAR, MSG_UFOLOST, MSG_UFOSPOTTED, MSO_CheckAddNewMessage(), base_t::name, NT_UFO_ATTACKING, NT_UFO_SIGNAL_LOST, NT_UFO_SPOTTED, aircraft_t::pos, base_t::pos, Q_strncpyz(), base_t::radar, RADAR_CheckUFOSensored(), RADAR_DeactivateRadarOverlay(), UFO_DetectNewUFO(), UFO_GetName(), UFO_GetNext(), and va().
Referenced by CP_CampaignFunctionPeriodicCall().
| void UFO_CampaignRunUFOs | ( | const campaign_t * | campaign, |
| int | deltaTime ) |
Make the UFOs run.
| [in] | campaign | The campaign data structure |
| [in] | deltaTime | The time passed since last call |
Definition at line 601 of file cp_ufo.cpp.
References AIR_AircraftMakeMove(), AIR_STATS_FUELSIZE, AIR_UFO, ccs, CP_CheckNextStageDestination(), aircraftSlot_t::delayNextShot, aircraft_t::fuel, GEO_CheckPositionBoundaries(), aircraft_t::landed, aircraft_t::maxWeapons, aircraft_t::mission, mapline_t::numPoints, mapline_t::point, aircraft_t::pos, aircraft_t::route, STAGE_INTERCEPT, aircraft_t::stats, aircraft_t::status, UFO_GetByIDX(), UFO_SearchAircraftTarget(), UFO_SetRandomDest(), UFO_SetRandomDestAround(), Vector2Copy, and aircraft_t::weapons.
Referenced by CP_CampaignFunctionPeriodicCall(), and TEST_F().
| bool UFO_CanDoMission | ( | const ufoType_t | uType, |
| const char * | mType ) |
Check if the UFO type is available for the given mission type.
| uType | The UFO type to check |
| mType | The mission type to check |
Definition at line 137 of file cp_ufo.cpp.
References cgi, aircraft_t::missionTypes, and UFO_GetByType().
Referenced by CP_InterceptMissionSet(), and UFO_GetAvailableUFOsForMission().
| void UFO_CheckShootBack | ( | const campaign_t * | campaign, |
| aircraft_t * | ufo, | ||
| aircraft_t * | phalanxAircraft ) |
Check if the ufo can shoot back at phalanx aircraft.
| [in] | campaign | The campaign data structure |
| [in,out] | ufo | The ufo to check the shotting for |
| [in,out] | phalanxAircraft | The possible target |
Definition at line 578 of file cp_ufo.cpp.
References AIR_IsAircraftOnGeoscape(), aircraft_t::aircraftTarget, AIRFIGHT_ExecuteActions(), CP_UFOProceedMission(), and UFO_SendPursuingAircraft().
Referenced by AIRFIGHT_ExecuteActions(), TEST_F(), and UFO_SearchAircraftTarget().
| aircraft_t * UFO_CreateFromTemplate | ( | const aircraft_t * | ufoTemplate | ) |
Creates a new ufo on the geoscape from the given aircraft template.
| ufoTemplate | The aircraft template to create the ufo from. |
nullptr if the max allowed amount of ufos are already on the geoscape, otherwise the newly created ufo pointer Definition at line 741 of file cp_ufo.cpp.
References AIR_IsUFO, ccs, aircraft_t::idx, MAX_UFOONGEOSCAPE, and UFO_GetByIDX().
Referenced by CP_AttackUFOCarrier_f(), and UFO_AddToGeoscape().
| void UFO_DetectNewUFO | ( | aircraft_t * | ufocraft | ) |
Perform actions when a new UFO is detected.
| [in] | ufocraft | Pointer to the UFO that has just been detected. |
Definition at line 842 of file cp_ufo.cpp.
References ccs, cgi, CP_TriggerEvent(), aircraft_t::detected, aircraft_t::detectionIdx, GEO_IsRadarOverlayActivated(), GEO_SetOverlay(), GEO_UpdateGeoscapeDock(), aircraft_t::getUfoType(), aircraft_t::lastSpotted, and UFO_DETECTION.
Referenced by AIRFIGHT_ExecuteActions(), CP_CheckNewMissionDetectedOnGeoscape(), and UFO_CampaignCheckEvents().
| int UFO_GetAvailableUFOsForMission | ( | const interestCategory_t | missionType, |
| ufoType_t * | ufoTypes, | ||
| bool | checkInterest ) |
Fill an array with available UFOs for the mission type.
| [in] | missionType | The kind ofmission we are currently creating. |
| [out] | ufoTypes | Array of ufoType_t that may be used for this mission. |
| [in] | checkInterest | Do a UFO_ShouldAppearOnGeoscape check if true (default) |
ufoTypes Definition at line 153 of file cp_ufo.cpp.
References cgi, i, INTERESTCATEGORY_BASE_ATTACK, INTERESTCATEGORY_BUILDING, INTERESTCATEGORY_HARVEST, INTERESTCATEGORY_INTERCEPT, INTERESTCATEGORY_INTERCEPTBOMBING, INTERESTCATEGORY_RECON, INTERESTCATEGORY_SUBVERT, INTERESTCATEGORY_SUPPLY, INTERESTCATEGORY_TERROR_ATTACK, INTERESTCATEGORY_XVI, UFO_CanDoMission(), and UFO_ShouldAppearOnGeoscape().
Referenced by CP_MissionChooseUFO(), NAT_ScriptSanityCheck(), TEST_F(), TEST_F(), TEST_F(), and UFO_GetOneAvailableUFOForMission().
| aircraft_t * UFO_GetByIDX | ( | const int | idx | ) |
returns the UFO on the geoscape with a certain index
| [in] | idx | Index of the UFO |
Definition at line 85 of file cp_ufo.cpp.
References ccs, and MAX_UFOONGEOSCAPE.
Referenced by AIR_LoadXML(), AIR_SaveXML(), AIRFIGHT_LoadXML(), B_LoadBaseSlotsXML(), UFO_CampaignRunUFOs(), UFO_CreateFromTemplate(), UFO_GeoSelectUFO_f(), and UFO_NotifyPhalanxAircraftRemoved().
| const aircraft_t * UFO_GetByType | ( | const ufoType_t | type | ) |
Get the aircraft template for a given UFO type.
| type | The UFO type to get the template for |
Definition at line 109 of file cp_ufo.cpp.
References ccs, cgi, ERR_DROP, aircraft_t::getUfoType(), i, and type.
Referenced by TEST_F(), TEST_F(), UFO_CanDoMission(), and UFO_ShouldAppearOnGeoscape().
| const char * UFO_GetName | ( | const aircraft_t * | ufocraft | ) |
Returns name of the UFO if UFO has been researched.
| [in] | ufocraft | Pointer to the UFO. |
Definition at line 243 of file cp_ufo.cpp.
References _, aircraft_t::detectionIdx, aircraft_t::name, RS_IsResearched_ptr(), aircraft_t::tech, and va().
Referenced by BDEF_BaseDefenceMenuUpdate_f(), CP_CreateBattleParameters(), GEO_Click(), GEO_GetUFOText(), INS_FillUFOYardData_f(), MIS_GetName(), UFO_CampaignCheckEvents(), UR_DialogStartStore_f(), UR_ProcessActive(), and US_SelectStoredUfo_f().
| aircraft_t * UFO_GetNext | ( | aircraft_t * | lastUFO | ) |
Iterates through the UFOs.
| [in] | lastUFO | Pointer of the aircraft to iterate from. call with nullptr to get the first one. |
Definition at line 41 of file cp_ufo.cpp.
References ccs.
Referenced by AIR_PostLoadInitMissions(), RADAR_SetRadarAfterLoading(), UFO_CampaignCheckEvents(), UFO_GetNextOnGeoscape(), and UFO_UpdateAlienInterestForAllBasesAndInstallations().
| aircraft_t * UFO_GetNextOnGeoscape | ( | aircraft_t * | lastUFO | ) |
Definition at line 66 of file cp_ufo.cpp.
References cgi, UFO_GetNext(), and UFO_IsUFOSeenOnGeoscape().
Referenced by BDEF_AutoTarget(), GEO_Click(), GEO_DrawMarkers(), GEO_GetGeoscapeAngle(), GEO_GetUFOAngle(), GEO_UpdateGeoscapeDock(), TEST_F(), and UFO_SearchAircraftTarget().
| int UFO_GetOneAvailableUFOForMission | ( | const interestCategory_t | missionType, |
| bool | checkInterest ) |
Get a suitable UFO for the mission type.
| [in] | missionType | The kind of mission we are currently creating. |
| [in] | checkInterest | Do a UFO_ShouldAppearOnGeoscape check if true (default) |
Definition at line 217 of file cp_ufo.cpp.
References UFO_GetAvailableUFOsForMission(), UFO_MAX, and UFO_NONE.
| const technology_t * UFO_GetTechnologyFromType | ( | const ufoType_t | type | ) |
Get the technology for a given UFO type.
| type | UFO type to get the technology for |
nullptr. Definition at line 97 of file cp_ufo.cpp.
References cgi, RS_GetTechByProvided(), and type.
Referenced by UFO_TypeToName().
| const aircraft_t * UFO_GetTemplate | ( | ufoType_t | ufoType | ) |
Get the template data for the given ufo type.
| ufoType | The ufo type to search the template for. |
nullptr in case the ufoType wasn't found, or the pointer to the ufo template. Definition at line 695 of file cp_ufo.cpp.
References AIR_IsUFO, ccs, and aircraft_t::getUfoType().
Referenced by CP_AttackUFOCarrier_f().
|
static |
Get the template data for the given ufo type.
| ufoType | The ufo type to search the template for. |
nullptr in case the ufoType wasn't found, or the pointer to the ufo template. Definition at line 718 of file cp_ufo.cpp.
References AIR_IsUFO, ccs, aircraft_t::getUfoType(), and aircraft_t::notOnGeoscape.
Referenced by UFO_AddToGeoscape().
Init actions for ufo-subsystem.
Definition at line 1011 of file cp_ufo.cpp.
References cgi, CVAR_DEVELOPER, UFO_InitCallbacks(), and ufoDebugCallbacks.
Referenced by CP_InitStartup().
|
static |
Check if a UFO is the target of a base.
| [in] | ufo | The UFO to check |
| [in] | base | Pointer to the base |
Definition at line 309 of file cp_ufo.cpp.
References base_t::batteries, i, base_t::lasers, base_t::numBatteries, base_t::numLasers, baseWeapon_t::target, UFO_IS_NO_TARGET, UFO_IS_TARGET_OF_LASER, and UFO_IS_TARGET_OF_MISSILE.
Referenced by UFO_UpdateAlienInterestForOneBase().
|
static |
Check if a UFO is the target of an installation.
| [in] | ufo | The UFO to check |
| [in] | installation | Pointer to the installation |
Definition at line 332 of file cp_ufo.cpp.
References installation_t::batteries, i, installation_t::numBatteries, baseWeapon_t::target, UFO_IS_NO_TARGET, and UFO_IS_TARGET_OF_MISSILE.
Referenced by UFO_UpdateAlienInterestForOneInstallation().
| bool UFO_IsUFOSeenOnGeoscape | ( | const aircraft_t * | ufo | ) |
Check if an aircraft should be seen on geoscape.
Definition at line 989 of file cp_ufo.cpp.
References cgi, aircraft_t::detected, ERR_DROP, aircraft_t::id, aircraft_t::landed, and aircraft_t::notOnGeoscape.
Referenced by AIRFIGHT_BaseShoot(), AIRFIGHT_InstallationShoot(), GEO_DrawRadarInMap(), UFO_GetNextOnGeoscape(), and UFO_SearchAircraftTarget().
| void UFO_NotifyPhalanxAircraftRemoved | ( | const aircraft_t *const | aircraft | ) |
Notify to UFOs that a Phalanx aircraft has been destroyed.
| [in] | aircraft | Pointer to the Phalanx aircraft that has been removed. |
Definition at line 972 of file cp_ufo.cpp.
References aircraft_t::aircraftTarget, ccs, and UFO_GetByIDX().
Referenced by AIRFIGHT_ActionsAfterAirfight(), and B_MoveAircraftOnGeoscapeToOtherBases().
| void UFO_RemoveFromGeoscape | ( | aircraft_t * | ufo | ) |
Remove the specified ufo from geoscape.
Definition at line 817 of file cp_ufo.cpp.
References ccs, cgi, DEBUG_CLIENT, aircraft_t::id, and REMOVE_ELEM_ADJUST_IDX.
Referenced by AIR_LoadXML(), AIR_PostLoadInitMissions(), CP_UFORemoveFromGeoscape(), and TEST_F().
|
static |
Check if the ufo can shoot at a PHALANX aircraft and whether it should follow another ufo.
Definition at line 461 of file cp_ufo.cpp.
References _, AIR_Foreach, AIR_GetDestinationWhilePursuing(), AIR_IsAircraftOnGeoscape(), AIR_TRANSIT, aircraft_t::aircraftTarget, AIRFIGHT_ExecuteActions(), dest, GEO_CalcLine(), GetDistanceOnGlobe(), aircraft_t::leader, MAX_DETECTING_RANGE, aircraft_t::mission, MSO_CheckAddNewMessage(), NT_UFO_ATTACKING, aircraft_t::point, aircraft_t::pos, aircraft_t::route, STAGE_INTERCEPT, aircraft_t::status, aircraft_t::time, UFO_CheckShootBack(), UFO_GetNextOnGeoscape(), UFO_IsUFOSeenOnGeoscape(), UFO_SendPursuingAircraft(), and va().
Referenced by UFO_CampaignRunUFOs().
| bool UFO_SendPursuingAircraft | ( | aircraft_t * | ufo, |
| aircraft_t * | aircraft ) |
Make the specified UFO pursue a phalanx aircraft.
| [in,out] | ufo | Pointer to the UFO. |
| [in,out] | aircraft | Pointer to the target aircraft. |
Definition at line 532 of file cp_ufo.cpp.
References AIR_GetDestinationWhilePursuing(), AIR_TRANSIT, AIR_UFO, aircraft_t::aircraftTarget, AIRFIGHT_ChooseWeapon(), AIRFIGHT_WEAPON_CAN_NEVER_SHOOT, dest, GEO_CalcLine(), aircraft_t::maxWeapons, aircraft_t::point, aircraft_t::pos, aircraft_t::route, aircraft_t::status, aircraft_t::time, and aircraft_t::weapons.
Referenced by AIRFIGHT_ExecuteActions(), UFO_CheckShootBack(), and UFO_SearchAircraftTarget().
| void UFO_SendToDestination | ( | aircraft_t * | ufo, |
| const vec2_t | dest ) |
Make the specified UFO go to destination.
| [in,out] | ufo | Pointer to the UFO. |
| [in] | dest | Destination. |
Definition at line 562 of file cp_ufo.cpp.
References AIR_TRANSIT, dest, GEO_CalcLine(), aircraft_t::point, aircraft_t::pos, aircraft_t::route, aircraft_t::status, and aircraft_t::time.
Referenced by CP_BaseAttackGoToBase(), CP_BuildBaseGoToBase(), CP_HarvestMissionGo(), CP_InterceptGoToInstallation(), CP_ReconMissionGroundGo(), CP_SupplyGoToBase(), CP_TerrorMissionGo(), CP_UFOProceedMission(), TEST_F(), TEST_F(), UFO_AddToGeoscape(), UFO_SetRandomDest(), and UFO_SetRandomDestAround().
| void UFO_SetRandomDest | ( | aircraft_t * | ufocraft | ) |
Give a random destination to the given UFO, and make him to move there.
| [in] | ufocraft | Pointer to the UFO which destination will be changed. |
Definition at line 259 of file cp_ufo.cpp.
References CP_GetRandomPosOnGeoscape(), and UFO_SendToDestination().
Referenced by CP_BaseAttackMissionLeave(), CP_BuildBaseGovernmentLeave(), CP_BuildBaseMissionLeave(), CP_InterceptMissionLeave(), CP_LeaveRescueMission(), CP_ReconMissionLeave(), CP_SupplyMissionLeave(), CP_UFOProceedMission(), UFO_AddToGeoscape(), and UFO_CampaignRunUFOs().
| void UFO_SetRandomDestAround | ( | aircraft_t * | ufocraft, |
| const vec2_t | pos ) |
Give a random destination to the given UFO close to a position, and make him to move there.
| [in] | ufocraft | Pointer to the UFO which destination will be changed. |
| [in] | pos | The position the UFO should around. |
Definition at line 274 of file cp_ufo.cpp.
References dest, gaussrand(), UFO_SendToDestination(), and Vector2Set.
Referenced by CP_InterceptAttackInstallation(), and UFO_CampaignRunUFOs().
|
static |
Give a random position to the given UFO.
| [in] | ufocraft | Pointer to the UFO which position will be changed. |
Definition at line 294 of file cp_ufo.cpp.
References CP_GetRandomPosOnGeoscape(), aircraft_t::pos, and Vector2Copy.
Referenced by UFO_AddToGeoscape().
| bool UFO_ShouldAppearOnGeoscape | ( | const ufoType_t | type | ) |
Some UFOs may only appear if after some interest level in the current running campaign is reached.
| type | The UFO type to check the interest level for |
true if the UFO may appear on geoscape, false otherwise Definition at line 125 of file cp_ufo.cpp.
References ccs, type, UFO_GetByType(), and aircraft_t::ufoInterestOnGeoscape.
Referenced by UFO_GetAvailableUFOsForMission().
Closing actions for ufo-subsystem.
Definition at line 1023 of file cp_ufo.cpp.
References cgi, UFO_ShutdownCallbacks(), and ufoDebugCallbacks.
Referenced by CP_Shutdown().
| const char * UFO_TypeToName | ( | const ufoType_t | type | ) |
Translate UFO type to name.
Definition at line 231 of file cp_ufo.cpp.
References _, cgi, ERR_DROP, technology_t::name, type, and UFO_GetTechnologyFromType().
Referenced by PR_DisassemblyInfo(), PR_FinishDisassembly(), PR_GetName(), and PR_UpdateProductionList().
Update alien interest for all PHALANX bases.
DETECTION_INTERVAL Definition at line 437 of file cp_ufo.cpp.
References B_GetNext(), INS_Foreach, aircraft_t::landed, UFO_GetNext(), UFO_UpdateAlienInterestForOneBase(), and UFO_UpdateAlienInterestForOneInstallation().
Referenced by CP_CampaignFunctionPeriodicCall().
|
static |
Update alien interest for one PHALANX base.
| [in] | ufo | Pointer to the aircraft_t |
| [in] | base | Pointer to the base |
DETECTION_INTERVAL), so it must stay simple. it must not depend on dt , otherwise alien interest will depend on time scale. < above this distance, probability to detect base will decrease by decreasingFactor
Definition at line 353 of file cp_ufo.cpp.
References base_t::alienInterest, DETECTION_INTERVAL, GetDistanceOnGlobe(), MAX_DETECTING_RANGE, aircraft_t::pos, base_t::pos, UFO_IS_TARGET_OF_LASER, UFO_IS_TARGET_OF_MISSILE, and UFO_IsTargetOfBase().
Referenced by UFO_UpdateAlienInterestForAllBasesAndInstallations().
|
static |
Update alien interest for one PHALANX installation (radar tower, SAM, ...).
| [in] | ufo | Pointer to the aircraft_t |
| [in] | installation | Pointer to the installation |
< above this distance, probability to detect base will decrease by decreasingFactor
Definition at line 395 of file cp_ufo.cpp.
References installation_t::alienInterest, DETECTION_INTERVAL, GetDistanceOnGlobe(), MAX_DETECTING_RANGE, aircraft_t::pos, installation_t::pos, UFO_IS_TARGET_OF_LASER, UFO_IS_TARGET_OF_MISSILE, and UFO_IsTargetOfInstallation().
Referenced by UFO_UpdateAlienInterestForAllBasesAndInstallations().
|
static |
range to detect and fire at phalanx aircraft
Definition at line 34 of file cp_ufo.cpp.
Referenced by UFO_SearchAircraftTarget(), UFO_UpdateAlienInterestForOneBase(), and UFO_UpdateAlienInterestForOneInstallation().
|
static |
Definition at line 999 of file cp_ufo.cpp.
Referenced by UFO_InitStartup(), and UFO_Shutdown().