Campaign missions code. More...
#include "../cl_shared.h"
#include "../cl_renderer.h"
#include "../cl_team.h"
#include "../cl_game.h"
#include "../ui/ui_main.h"
#include "cp_campaign.h"
#include "cp_map.h"
#include "cp_ufo.h"
#include "cp_alienbase.h"
#include "cp_alien_interest.h"
#include "cp_missions.h"
#include "cp_time.h"
#include "cp_xvi.h"
#include "save/save_missions.h"
#include "save/save_interest.h"
Go to the source code of this file.
Functions | |
void | CP_SetMissionVars (const mission_t *mission) |
Set some needed cvars from mission definition. | |
void | CP_StartMissionMap (mission_t *mission) |
Select the mission type and start the map from mission definition. | |
static qboolean | CP_IsAlienTeamForCategory (const alienTeamCategory_t const *cat, const interestCategory_t missionCat) |
Check if an alien team category may be used for a mission category. | |
static void | CP_SetAlienTeamByInterest (const mission_t *mission) |
Sets the alien races used for a mission. | |
static qboolean | CP_IsAlienEquipmentSelectable (const mission_t *mission, const equipDef_t *equip) |
Check if an alien equipment may be used with a mission. | |
static void | CP_SetAlienEquipmentByInterest (const mission_t *mission) |
Set alien equipment for a mission (depends on the interest values). | |
static void | CP_CreateAlienTeam (mission_t *mission) |
Set number of aliens in mission. | |
static void | CP_CreateCivilianTeam (const mission_t *mission) |
Create civilian team. | |
void | CP_CreateBattleParameters (mission_t *mission, battleParam_t *param) |
Create parameters needed for battle. This is the data that is used for starting the tactical part of the mission. | |
mission_t * | CP_GetMissionByIDSilent (const char *missionId) |
Get a mission in ccs.missions by Id without error messages. | |
mission_t * | CP_GetMissionByID (const char *missionId) |
Get a mission in ccs.missions by Id. | |
mission_t * | MAP_GetMissionByIDX (int id) |
Find mission corresponding to idx. | |
int | MAP_GetIDXByMission (const mission_t *mis) |
Find idx corresponding to mission. | |
const char * | CP_MissionToTypeString (const mission_t *mission) |
Return the type of mission. | |
int | CP_CountMission (void) |
Count the number of mission created. | |
int | CP_CountMissionActive (void) |
Count the number of mission created and active. | |
int | CP_CountMissionOnGeoscape (void) |
Count the number of mission active and displayed on geoscape. | |
const char * | MAP_GetMissionModel (const mission_t *mission) |
Get mission model that should be shown on the geoscape. | |
static missionDetectionStatus_t | CP_CheckMissionVisibleOnGeoscape (const mission_t const *mission) |
Check if a mission should be visible on geoscape. | |
void | CP_MissionRemoveFromGeoscape (mission_t *mission) |
Removes a mission from geoscape: make it non visible and call notify functions. | |
static messageType_t | CP_MissionGetMessageLevel (const mission_t *mission) |
Decides which message level to take for the given mission. | |
static const char * | CP_MissionGetMessage (const mission_t *mission) |
Assembles a message that is send to the gamer once the given mission is added to geoscape. | |
void | CP_MissionAddToGeoscape (mission_t *mission, qboolean force) |
Add a mission to geoscape: make it visible and stop time. | |
qboolean | CP_CheckNewMissionDetectedOnGeoscape (void) |
Check if mission has been detected by radar. | |
void | CP_UpdateMissionVisibleOnGeoscape (void) |
Update all mission visible on geoscape (in base radar range). | |
void | CP_UFORemoveFromGeoscape (mission_t *mission, qboolean destroyed) |
Removes (temporarily or permanently) a UFO from geoscape: make it land and call notify functions. | |
void | CP_MissionRemove (mission_t *mission) |
Removes a mission from mission global array. | |
void | CP_MissionDisableTimeLimit (mission_t *mission) |
Disable time limit for given mission. | |
qboolean | CP_CheckMissionLimitedInTime (const mission_t *mission) |
Check if mission should end because of limited time. | |
void | CP_MissionNotifyBaseDestroyed (const base_t *base) |
Notify that a base has been removed. | |
void | CP_MissionNotifyInstallationDestroyed (const installation_t const *installation) |
Notify missions that an installation has been destroyed. | |
void | CP_MissionStageEnd (mission_t *mission) |
Determine what action should be performed when a mission stage ends. | |
void | CP_MissionIsOver (mission_t *mission) |
Mission is finished because Phalanx team won it. | |
void | CP_MissionIsOverByUFO (aircraft_t *ufocraft) |
Mission is finished because Phalanx team ended it. | |
static qboolean | CP_TransferOfAliensToOtherBaseNeeded (const base_t *base, const missionResults_t *missionResults) |
Checks whether aliens can be stored on a base or should be transfered to another. | |
void | CP_MissionEndActions (mission_t *mission, aircraft_t *aircraft, qboolean won) |
Actions to be done after mission finished. | |
void | CP_MissionEnd (mission_t *mission, qboolean won) |
qboolean | CP_CheckNextStageDestination (aircraft_t *ufocraft) |
Check if a stage mission is over when UFO reached destination. | |
void | CP_UFOProceedMission (aircraft_t *ufo) |
Make UFO proceed with its mission when the fight with another aircraft is over (and UFO survived). | |
void | CP_SpawnCrashSiteMission (aircraft_t *ufo) |
Spawn a new crash site after a UFO has been destroyed. | |
void | CP_SpawnRescueMission (aircraft_t *aircraft, aircraft_t *ufo) |
Spawn a new rescue mission for a crashed aircraft. | |
qboolean | CP_MissionBegin (mission_t *mission) |
mission begins: UFO arrive on earth. | |
ufoType_t | CP_MissionChooseUFO (const mission_t *mission) |
Choose UFO type for a given mission category. | |
static void | CP_SetMissionName (mission_t *mission) |
Set mission name. | |
mission_t * | CP_CreateNewMission (interestCategory_t category, qboolean beginNow) |
Create a new mission of given category. | |
static int | CP_SelectNewMissionType (void) |
Select new mission type. | |
void | CP_SpawnNewMissions (void) |
Spawn new missions. | |
void | CP_InitializeSpawningDelay (void) |
Initialize spawning delay. | |
qboolean | CP_SaveMissionsXML (mxml_node_t *parent) |
Save callback for savegames in XML Format. | |
qboolean | CP_LoadMissionsXML (mxml_node_t *parent) |
Load callback for savegames in XML Format. | |
void | CP_MissionsInit (void) |
Variables | |
const int | MAX_POS_LOOP = 10 |
static const float | MIN_CRASHEDUFO_CONDITION = 0.2f |
static const float | MAX_CRASHEDUFO_CONDITION = 0.81f |
Campaign missions code.
Definition in file cp_missions.c.
Check if mission should end because of limited time.
Definition at line 982 of file cp_missions.c.
References date_s::day, and mission_s::finalDate.
Referenced by CP_CheckMissionEnd().
static missionDetectionStatus_t CP_CheckMissionVisibleOnGeoscape | ( | const mission_t const * | mission | ) | [static] |
Check if a mission should be visible on geoscape.
[in] | mission | Pointer to mission we want to check visibility. |
Definition at line 689 of file cp_missions.c.
References mission_s::category, mission_s::crashed, aircraft_s::detected, INTERESTCATEGORY_RESCUE, aircraft_s::landed, MISDET_ALWAYS_DETECTED, MISDET_CANT_BE_DETECTED, MISDET_MAY_BE_DETECTED, mission_s::pos, mission_s::posAssigned, qfalse, RADAR_CheckRadarSensored(), mission_s::stage, STAGE_BASE_ATTACK, STAGE_BASE_DISCOVERED, STAGE_BUILD_BASE, STAGE_COME_FROM_ORBIT, STAGE_HARVEST, STAGE_INTERCEPT, STAGE_MISSION_GOTO, STAGE_NOT_ACTIVE, STAGE_OVER, STAGE_RECON_AIR, STAGE_RECON_GROUND, STAGE_RETURN_TO_ORBIT, STAGE_SPREAD_XVI, STAGE_SUBVERT_GOV, STAGE_SUPPLY, STAGE_TERROR_MISSION, and mission_s::ufo.
Referenced by CP_CheckNewMissionDetectedOnGeoscape(), CP_MissionAddToGeoscape(), and CP_UpdateMissionVisibleOnGeoscape().
qboolean CP_CheckNewMissionDetectedOnGeoscape | ( | void | ) |
Check if mission has been detected by radar.
DETECTION_INTERVAL
. Definition at line 816 of file cp_missions.c.
References ccs, CP_CheckMissionVisibleOnGeoscape(), CP_MissionAddToGeoscape(), linkedList_s::data, aircraft_s::detected, DETECTION_INTERVAL, frand(), MAP_IsRadarOverlayActivated(), MAP_SetOverlay(), MISDET_MAY_BE_DETECTED, ccs_s::missions, linkedList_s::next, mission_s::onGeoscape, qfalse, qtrue, and mission_s::ufo.
Referenced by CL_CampaignFunctionPeriodicCall().
qboolean CP_CheckNextStageDestination | ( | aircraft_t * | ufocraft | ) |
Check if a stage mission is over when UFO reached destination.
[in] | ufocraft | Pointer to the ufo that reached destination. |
Definition at line 1288 of file cp_missions.c.
References CP_MissionStageEnd(), aircraft_s::mission, qfalse, qtrue, mission_s::stage, STAGE_COME_FROM_ORBIT, STAGE_MISSION_GOTO, and STAGE_RETURN_TO_ORBIT.
Referenced by UFO_CampaignRunUFOs().
int CP_CountMission | ( | void | ) |
Count the number of mission created.
Definition at line 562 of file cp_missions.c.
References ccs, Com_Printf(), linkedList_s::data, ccs_s::missions, linkedList_s::next, mission_s::stage, and STAGE_OVER.
Referenced by CP_MissionRemove().
int CP_CountMissionActive | ( | void | ) |
Count the number of mission created and active.
Definition at line 593 of file cp_missions.c.
References ccs, Com_DPrintf(), linkedList_s::data, DEBUG_CLIENT, ccs_s::missions, linkedList_s::next, mission_s::stage, STAGE_NOT_ACTIVE, and STAGE_OVER.
int CP_CountMissionOnGeoscape | ( | void | ) |
Count the number of mission active and displayed on geoscape.
Definition at line 618 of file cp_missions.c.
References ccs, linkedList_s::data, ccs_s::missions, linkedList_s::next, mission_s::onGeoscape, mission_s::stage, STAGE_NOT_ACTIVE, and STAGE_OVER.
Referenced by MAP_GetGeoscapeAngle().
static void CP_CreateAlienTeam | ( | mission_t * | mission | ) | [static] |
Set number of aliens in mission.
[in] | mission | Pointer to the mission that generates the battle. |
Definition at line 273 of file cp_missions.c.
References battleParam_s::aliens, ccs_s::battleParameters, ccs, CP_SetAlienEquipmentByInterest(), CP_SetAlienTeamByInterest(), mission_s::mapDef, mapDef_s::maxAliens, aircraft_s::maxTeamSize, ccs_s::overallInterest, mission_s::posAssigned, and mission_s::ufo.
Referenced by CP_CreateBattleParameters().
void CP_CreateBattleParameters | ( | mission_t * | mission, | |
battleParam_t * | param | |||
) |
Create parameters needed for battle. This is the data that is used for starting the tactical part of the mission.
[in] | mission | Pointer to the mission that generates the battle |
[out] | param | The battle parameters to set |
Definition at line 321 of file cp_missions.c.
References byte, ccs, Com_GetRandomMapAssemblyNameForCraft(), Com_sprintf(), Com_UFOCrashedTypeToShortName(), Com_UFOTypeToShortName(), cp_campaignPool, CP_CreateAlienTeam(), CP_CreateCivilianTeam(), mission_s::crashed, Cvar_Set(), frand(), aircraft_s::id, mapDef_s::id, mapDef_s::map, MAP_GetColor(), MAP_GetTerrainType(), mission_s::mapDef, MAPTYPE_TERRAIN, MAX_CRASHEDUFO_CONDITION, Mem_Free, Mem_PoolStrDup, MIN_CRASHEDUFO_CONDITION, battleParam_s::mission, ccs_s::missionAircraft, mission_s::onwin, battleParam_s::param, mission_s::pos, mission_s::posAssigned, mission_s::ufo, aircraft_s::ufotype, and battleParam_s::zoneType.
Referenced by CL_GameAutoGo(), and CP_StartSelectedMission().
static void CP_CreateCivilianTeam | ( | const mission_t * | mission | ) | [static] |
Create civilian team.
[in] | mission | Pointer to the mission that generates the battle |
Definition at line 295 of file cp_missions.c.
References ccs_s::battleParameters, ccs, battleParam_s::civilians, battleParam_s::civTeam, nation_s::id, MAP_GetCivilianNumberByPosition(), MAP_GetNation(), battleParam_s::nation, mission_s::pos, mission_s::posAssigned, and Q_strncpyz().
Referenced by CP_CreateBattleParameters().
mission_t* CP_CreateNewMission | ( | interestCategory_t | category, | |
qboolean | beginNow | |||
) |
Create a new mission of given category.
[in] | category | category of the mission |
[in] | beginNow | true if the mission should begin now |
Definition at line 1605 of file cp_missions.c.
References byte, ccs_s::campaignStats, mission_s::category, ccs, CP_BaseAttackMissionOnSpawn(), CP_BuildBaseMissionOnSpawn(), CP_SetMissionName(), CP_TerrorMissionOnSpawn(), linkedList_s::data, ccs_s::date, Date_Add(), Date_Random(), date_s::day, mission_s::finalDate, mission_s::idx, mission_s::initialIndividualInterest, mission_s::initialOverallInterest, ccs_s::interest, INTERESTCATEGORY_BASE_ATTACK, INTERESTCATEGORY_BUILDING, INTERESTCATEGORY_MAX, INTERESTCATEGORY_TERROR_ATTACK, LIST_Add(), ccs_s::missions, stats_s::missions, ccs_s::overallInterest, date_s::sec, mission_s::stage, STAGE_NOT_ACTIVE, mission_s::startDate, and mission_s::ufo.
Referenced by CP_SpawnAlienBaseMission(), CP_SpawnNewMissions(), CP_SpawnRescueMission(), and CP_StartXVISpreading_f().
mission_t* CP_GetMissionByID | ( | const char * | missionId | ) |
Get a mission in ccs.missions by Id.
[in] | missionId | Unique string id for the mission |
Definition at line 407 of file cp_missions.c.
References Com_Printf(), and CP_GetMissionByIDSilent().
Referenced by AIR_PostLoadInitMissions().
mission_t* CP_GetMissionByIDSilent | ( | const char * | missionId | ) |
Get a mission in ccs.missions by Id without error messages.
[in] | missionId | Unique string id for the mission |
Definition at line 386 of file cp_missions.c.
References ccs, linkedList_s::data, mission_s::id, ccs_s::missions, and linkedList_s::next.
Referenced by CP_GetMissionByID(), and CP_SetMissionName().
void CP_InitializeSpawningDelay | ( | void | ) |
Initialize spawning delay.
Definition at line 1715 of file cp_missions.c.
References ccs, CP_SpawnNewMissions(), DELAY_BETWEEN_MISSION_SPAWNING, and ccs_s::lastMissionSpawnedDelay.
Referenced by CP_CampaignInit().
static qboolean CP_IsAlienEquipmentSelectable | ( | const mission_t * | mission, | |
const equipDef_t * | equip | |||
) | [static] |
Check if an alien equipment may be used with a mission.
[in] | mission | Pointer to the mission. |
[in] | equip | Pointer to the alien equipment to check. |
Definition at line 209 of file cp_missions.c.
References ccs_s::alienCategories, battleParam_s::alienTeamGroup, ccs_s::battleParameters, alienTeamGroup_s::categoryIdx, ccs, linkedList_s::data, alienTeamCategory_s::equipment, mission_s::initialOverallInterest, equipDef_s::maxInterest, equipDef_s::minInterest, equipDef_s::name, linkedList_s::next, qfalse, and qtrue.
Referenced by CP_SetAlienEquipmentByInterest().
static qboolean CP_IsAlienTeamForCategory | ( | const alienTeamCategory_t const * | cat, | |
const interestCategory_t | missionCat | |||
) | [static] |
Check if an alien team category may be used for a mission category.
[in] | cat | Pointer to the alien team category. |
[in] | missionCat | Mission category to check. |
Definition at line 151 of file cp_missions.c.
References i, alienTeamCategory_s::missionCategories, alienTeamCategory_s::numMissionCategories, qfalse, and qtrue.
Referenced by CP_SetAlienTeamByInterest().
qboolean CP_LoadMissionsXML | ( | mxml_node_t * | parent | ) |
Load callback for savegames in XML Format.
[in] | parent | XML Node structure, where we get the information from |
Definition at line 2017 of file cp_missions.c.
References AB_GetByIDX(), mission_s::active, AIR_AircraftGetFromIDX(), B_GetBaseByIDX(), BASE_UNDER_ATTACK, base_s::baseStatus, byte, BYTES_NONE, mission_s::category, ccs, Com_GetConstIntFromNamespace(), Com_GetMapDefinitionByID(), Com_Printf(), Com_RegisterConstList(), Com_UnregisterConstList(), CP_BasemissionIsSubvertingGovernmentMission(), mission_s::crashed, mission_s::data, date_s::day, mission_s::finalDate, mission_s::id, mission_s::idx, mission_s::initialIndividualInterest, mission_s::initialOverallInterest, INS_GetInstallationByIDX(), INTERESTCATEGORY_BASE_ATTACK, INTERESTCATEGORY_BUILDING, INTERESTCATEGORY_INTERCEPT, INTERESTCATEGORY_RESCUE, INTERESTCATEGORY_SUPPLY, lengthof, LIST_Add(), mission_s::location, mission_s::mapDef, ccs_s::missions, mxml_GetBool(), mxml_GetDate(), mxml_GetInt(), mxml_GetNextNode(), mxml_GetNode(), mxml_GetPos2(), mxml_GetString(), base_s::name, name, mission_s::onGeoscape, mission_s::onlose, mission_s::onwin, mission_s::pos, mission_s::posAssigned, Q_strncpyz(), qfalse, qtrue, SAVE_INTERESTCAT_NAMESPACE, SAVE_MISSIONS, SAVE_MISSIONS_ACTIVE, SAVE_MISSIONS_ALIENBASEINDEX, SAVE_MISSIONS_BASEINDEX, SAVE_MISSIONS_CATEGORY, SAVE_MISSIONS_CRASHED, SAVE_MISSIONS_CRASHED_AIRCRAFT, SAVE_MISSIONS_FINALDATE, SAVE_MISSIONS_ID, SAVE_MISSIONS_INITIALINDIVIDUALINTEREST, SAVE_MISSIONS_INITIALOVERALLINTEREST, SAVE_MISSIONS_INSTALLATIONINDEX, SAVE_MISSIONS_LOCATION, SAVE_MISSIONS_MAPDEF_ID, SAVE_MISSIONS_MAPDEFTIMES, SAVE_MISSIONS_MISSION, SAVE_MISSIONS_MISSION_IDX, SAVE_MISSIONS_ONGEOSCAPE, SAVE_MISSIONS_ONLOSE, SAVE_MISSIONS_ONWIN, SAVE_MISSIONS_POS, SAVE_MISSIONS_POSASSIGNED, SAVE_MISSIONS_STAGE, SAVE_MISSIONS_STARTDATE, SAVE_MISSIONS_UFO, SAVE_MISSIONSTAGE_NAMESPACE, saveInterestConstants, saveMissionConstants, date_s::sec, mission_s::stage, STAGE_BASE_ATTACK, STAGE_BUILD_BASE, STAGE_INTERCEPT, STAGE_MISSION_GOTO, mission_s::startDate, mapDef_s::timesAlreadyUsed, mission_s::ufo, and ccs_s::ufos.
Referenced by SAV_Init().
Add a mission to geoscape: make it visible and stop time.
[in] | mission | Pointer to added mission. |
[in] | force | true if the mission should be added even for mission needing a probabilty test to be seen. |
Definition at line 787 of file cp_missions.c.
References _, CL_GameTimeStop(), Com_Printf(), CP_CheckMissionVisibleOnGeoscape(), CP_MissionGetMessage(), CP_MissionGetMessageLevel(), aircraft_s::detected, MAP_UpdateGeoscapeDock(), MISDET_CANT_BE_DETECTED, MISDET_MAY_BE_DETECTED, MS_AddNewMessage(), mission_s::onGeoscape, mission_s::pos, aircraft_s::pos, qfalse, qtrue, mission_s::stage, and mission_s::ufo.
Referenced by CP_BuildBaseSubvertGovernment(), CP_CheckNewMissionDetectedOnGeoscape(), CP_HarvestMissionStart(), CP_ReconMissionGround(), CP_SpawnAlienBaseMission(), CP_SpawnCrashSiteMission(), CP_SpawnRescueMission(), CP_TerrorMissionStart(), CP_UpdateMissionVisibleOnGeoscape(), and CP_XVIMissionStart().
mission begins: UFO arrive on earth.
Definition at line 1463 of file cp_missions.c.
References ccs_s::campaignStats, ccs, Com_Printf(), Com_UFOTypeToShortName(), CP_MissionChooseUFO(), CP_MissionDisableTimeLimit(), CP_MissionRemove(), ccs_s::date, mission_s::finalDate, mission_s::idx, stats_s::missions, qfalse, qtrue, mission_s::stage, STAGE_COME_FROM_ORBIT, mission_s::ufo, UFO_AddToGeoscape(), and UFO_MAX.
Referenced by CP_BaseAttackMissionNextStage(), CP_BuildBaseMissionNextStage(), CP_HarvestMissionNextStage(), CP_InterceptNextStage(), CP_ReconMissionNextStage(), CP_TerrorMissionNextStage(), and CP_XVIMissionNextStage().
Choose UFO type for a given mission category.
[in] | mission | Pointer to the mission where the UFO will be added |
< Probability to start a mission from earth (without UFO)
< Typical XVI average value for spreading mission from earth
Definition at line 1497 of file cp_missions.c.
References mission_s::category, Com_Error(), CP_BaseAttackMissionAvailableUFOs(), CP_BuildBaseMissionAvailableUFOs(), CP_GetAverageXVIRate(), CP_HarvestMissionAvailableUFOs(), CP_InterceptMissionAvailableUFOs(), CP_ReconMissionAvailableUFOs(), CP_SupplyMissionAvailableUFOs(), CP_TerrorMissionAvailableUFOs(), CP_XVIMissionAvailableUFOs(), ERR_DROP, f, frand(), int(), INTERESTCATEGORY_ALIENBASE, INTERESTCATEGORY_BASE_ATTACK, INTERESTCATEGORY_BUILDING, INTERESTCATEGORY_HARVEST, INTERESTCATEGORY_INTERCEPT, INTERESTCATEGORY_MAX, INTERESTCATEGORY_NONE, INTERESTCATEGORY_RECON, INTERESTCATEGORY_RESCUE, INTERESTCATEGORY_SUPPLY, INTERESTCATEGORY_TERROR_ATTACK, INTERESTCATEGORY_XVI, qfalse, qtrue, Sys_Error(), and UFO_MAX.
Referenced by CP_MissionBegin(), and CP_SupplyMissionCreate().
void CP_MissionDisableTimeLimit | ( | mission_t * | mission | ) |
Disable time limit for given mission.
Definition at line 971 of file cp_missions.c.
References date_s::day, and mission_s::finalDate.
Referenced by CP_BaseAttackGoToBase(), CP_BaseAttackMissionLeave(), CP_BaseAttackStartMission(), CP_BuildBaseGovernmentLeave(), CP_BuildBaseMissionLeave(), CP_HarvestMissionGo(), CP_InterceptGoToInstallation(), CP_InterceptMissionLeave(), CP_MissionBegin(), CP_ReconMissionGroundGo(), CP_ReconMissionLeave(), CP_SpawnAlienBaseMission(), CP_SupplyMissionCreate(), CP_SupplyMissionLeave(), and CP_TerrorMissionGo().
Definition at line 1210 of file cp_missions.c.
References AIR_IsEmployeeInAircraft(), base_s::aircraftCurrent, battleParam_s::aliens, ccs_s::aliensKilled, ccs_s::battleParameters, ccs, employee_s::chr, battleParam_s::civilians, ccs_s::civiliansKilled, CL_HandleNationData(), CL_UpdateCharacterStats(), Cmd_ExecuteString(), Com_DPrintf(), CP_CheckLostCondition(), CP_MissionEndActions(), CP_ParseCharacterData(), CP_TransferOfAliensToOtherBaseNeeded(), mission_s::data, DEBUG_CLIENT, E_DeleteEmployee(), E_IsInBase(), ccs_s::eMission, EMPL_SOLDIER, ccs_s::employees, aircraft_s::homebase, character_s::HP, i, aircraft_s::idx, ccs_s::missionAircraft, ccs_s::missionResults, character_s::name, ccs_s::numEmployees, mission_s::stage, STAGE_BASE_ATTACK, base_s::storage, character_s::ucn, and va().
Referenced by GAME_CP_Results_f().
void CP_MissionEndActions | ( | mission_t * | mission, | |
aircraft_t * | aircraft, | |||
qboolean | won | |||
) |
Actions to be done after mission finished.
[in,out] | mission | Pointer to the finished mission |
[in,out] | aircraft | Pointer to the dropship done the mission |
[in] | won | Boolean flag if thew mission was successful (from PHALANX's PoV) |
Definition at line 1177 of file cp_missions.c.
References _, AIR_AircraftReturnToBase(), AIR_DestroyAircraft(), B_DumpAircraftToHomeBase(), mission_s::category, Com_sprintf(), CP_BaseAttackMissionDestroyBase(), CP_BaseAttackMissionIsFailure(), cp_messageBuffer, CP_MissionIsOver(), mission_s::data, aircraft_s::homebase, INTERESTCATEGORY_RESCUE, MS_AddNewMessage(), MSG_STANDARD, base_s::name, qfalse, mission_s::stage, and STAGE_BASE_ATTACK.
Referenced by CL_GameAutoGo(), and CP_MissionEnd().
static const char* CP_MissionGetMessage | ( | const mission_t * | mission | ) | [inline, static] |
Assembles a message that is send to the gamer once the given mission is added to geoscape.
[in] | mission | The mission that was added to the geoscape and for that a message should be created |
Definition at line 771 of file cp_missions.c.
References _, mission_s::category, Com_sprintf(), cp_messageBuffer, INTERESTCATEGORY_RESCUE, and mission_s::location.
Referenced by CP_MissionAddToGeoscape().
static messageType_t CP_MissionGetMessageLevel | ( | const mission_t * | mission | ) | [inline, static] |
Decides which message level to take for the given mission.
[in] | mission | The mission to chose the message level for |
Definition at line 750 of file cp_missions.c.
References mission_s::crashed, MSG_BASEATTACK, MSG_CRASHSITE, MSG_STANDARD, MSG_TERRORSITE, mission_s::stage, STAGE_BASE_ATTACK, and STAGE_TERROR_MISSION.
Referenced by CP_MissionAddToGeoscape().
void CP_MissionIsOver | ( | mission_t * | mission | ) |
Mission is finished because Phalanx team won it.
[in] | mission | Pointer to the mission that is ended. |
Definition at line 1093 of file cp_missions.c.
References mission_s::category, Com_Printf(), CP_BaseAttackMissionIsFailure(), CP_BaseAttackMissionIsSuccess(), CP_BuildBaseMissionBaseDestroyed(), CP_BuildBaseMissionIsFailure(), CP_BuildBaseMissionIsSuccess(), CP_HarvestMissionIsFailure(), CP_InterceptMissionIsFailure(), CP_InterceptMissionIsSuccess(), CP_MissionRemove(), CP_ReconMissionIsFailure(), CP_SupplyMissionIsFailure(), CP_SupplyMissionIsSuccess(), CP_TerrorMissionIsFailure(), CP_XVIMissionIsFailure(), CP_XVIMissionIsSuccess(), INTERESTCATEGORY_ALIENBASE, INTERESTCATEGORY_BASE_ATTACK, INTERESTCATEGORY_BUILDING, INTERESTCATEGORY_HARVEST, INTERESTCATEGORY_INTERCEPT, INTERESTCATEGORY_MAX, INTERESTCATEGORY_NONE, INTERESTCATEGORY_RECON, INTERESTCATEGORY_RESCUE, INTERESTCATEGORY_SUPPLY, INTERESTCATEGORY_TERROR_ATTACK, INTERESTCATEGORY_XVI, mission_s::stage, STAGE_BASE_ATTACK, STAGE_BUILD_BASE, STAGE_INTERCEPT, STAGE_SPREAD_XVI, and STAGE_SUPPLY.
Referenced by CP_MissionEndActions(), CP_MissionIsOverByUFO(), and CP_MissionStageEnd().
void CP_MissionIsOverByUFO | ( | aircraft_t * | ufocraft | ) |
Mission is finished because Phalanx team ended it.
[in] | ufocraft | Pointer to the UFO involved in this mission |
Definition at line 1153 of file cp_missions.c.
References CP_MissionIsOver(), and aircraft_s::mission.
Referenced by AIRFIGHT_ActionsAfterAirfight().
void CP_MissionNotifyBaseDestroyed | ( | const base_t * | base | ) |
Notify that a base has been removed.
Definition at line 997 of file cp_missions.c.
References mission_s::category, ccs, CP_BaseAttackMissionLeave(), mission_s::data, linkedList_s::data, INTERESTCATEGORY_BASE_ATTACK, ccs_s::missions, and linkedList_s::next.
Referenced by B_Destroy().
void CP_MissionNotifyInstallationDestroyed | ( | const installation_t const * | installation | ) |
Notify missions that an installation has been destroyed.
[in] | installation | Pointer to the installation that has been destroyed. |
Definition at line 1018 of file cp_missions.c.
References mission_s::category, ccs, CP_InterceptMissionLeave(), mission_s::data, linkedList_s::data, INTERESTCATEGORY_INTERCEPT, ccs_s::missions, linkedList_s::next, and qfalse.
Referenced by INS_DestroyInstallation().
void CP_MissionRemove | ( | mission_t * | mission | ) |
Removes a mission from mission global array.
Definition at line 928 of file cp_missions.c.
References ccs_s::battleParameters, ccs, Com_DPrintf(), Com_Printf(), CP_CountMission(), CP_MissionRemoveFromGeoscape(), CP_UFORemoveFromGeoscape(), linkedList_s::data, DEBUG_CLIENT, mission_s::id, LIST_RemoveEntry(), battleParam_s::mission, ccs_s::missions, linkedList_s::next, qtrue, and mission_s::ufo.
Referenced by CP_BaseAttackGoToBase(), CP_BaseAttackMissionIsFailure(), CP_BaseAttackMissionIsSuccess(), CP_BaseAttackMissionNextStage(), CP_BuildBaseMissionBaseDestroyed(), CP_BuildBaseMissionIsFailure(), CP_BuildBaseMissionIsSuccess(), CP_BuildBaseMissionNextStage(), CP_BuildBaseSetUpBase(), CP_HarvestMissionGo(), CP_HarvestMissionIsFailure(), CP_HarvestMissionIsSuccess(), CP_HarvestMissionNextStage(), CP_InterceptGoToInstallation(), CP_InterceptMissionIsFailure(), CP_InterceptMissionIsSuccess(), CP_InterceptNextStage(), CP_MissionBegin(), CP_MissionIsOver(), CP_MissionStageEnd(), CP_ReconMissionGroundGo(), CP_ReconMissionIsFailure(), CP_ReconMissionIsSuccess(), CP_ReconMissionNextStage(), CP_SpawnCrashSiteMission(), CP_SpawnRescueMission(), CP_SupplyGoToBase(), CP_SupplyMissionCreate(), CP_SupplyMissionIsFailure(), CP_SupplyMissionIsSuccess(), CP_SupplyMissionNextStage(), CP_SupplySetStayAtBase(), CP_TerrorMissionGo(), CP_TerrorMissionIsFailure(), CP_TerrorMissionIsSuccess(), CP_TerrorMissionNextStage(), CP_XVIMissionIsFailure(), CP_XVIMissionIsSuccess(), and CP_XVIMissionNextStage().
void CP_MissionRemoveFromGeoscape | ( | mission_t * | mission | ) |
Removes a mission from geoscape: make it non visible and call notify functions.
Definition at line 733 of file cp_missions.c.
References AIR_AircraftsNotifyMissionRemoved(), mission_s::category, INTERESTCATEGORY_BASE_ATTACK, MAP_NotifyMissionRemoved(), mission_s::onGeoscape, and qfalse.
Referenced by CP_InterceptMissionLeave(), CP_MissionRemove(), CP_ReconMissionGroundGo(), CP_ReconMissionLeave(), and CP_UpdateMissionVisibleOnGeoscape().
void CP_MissionsInit | ( | void | ) |
Definition at line 2162 of file cp_missions.c.
References Cmd_AddCommand().
Referenced by CP_InitStartup().
void CP_MissionStageEnd | ( | mission_t * | mission | ) |
Determine what action should be performed when a mission stage ends.
[in] | mission | Pointer to the mission which stage ended. |
Definition at line 1043 of file cp_missions.c.
References mission_s::category, ccs, Com_DPrintf(), Com_Printf(), CP_BaseAttackMissionNextStage(), CP_BuildBaseMissionNextStage(), CP_HarvestMissionNextStage(), CP_InterceptNextStage(), CP_MissionIsOver(), CP_MissionRemove(), CP_ReconMissionNextStage(), CP_SupplyMissionNextStage(), CP_TerrorMissionNextStage(), CP_XVIMissionNextStage(), mission_s::crashed, ccs_s::date, date_s::day, DEBUG_CLIENT, mission_s::id, INTERESTCATEGORY_ALIENBASE, INTERESTCATEGORY_BASE_ATTACK, INTERESTCATEGORY_BUILDING, INTERESTCATEGORY_HARVEST, INTERESTCATEGORY_INTERCEPT, INTERESTCATEGORY_MAX, INTERESTCATEGORY_NONE, INTERESTCATEGORY_RECON, INTERESTCATEGORY_RESCUE, INTERESTCATEGORY_SUPPLY, INTERESTCATEGORY_TERROR_ATTACK, INTERESTCATEGORY_XVI, date_s::sec, and mission_s::stage.
Referenced by CP_CheckMissionEnd(), CP_CheckNextStageDestination(), and CP_UFOProceedMission().
const char* CP_MissionToTypeString | ( | const mission_t * | mission | ) |
Return the type of mission.
Definition at line 451 of file cp_missions.c.
References _, mission_s::category, INTERESTCATEGORY_RESCUE, mission_s::stage, STAGE_BASE_ATTACK, STAGE_BASE_DISCOVERED, STAGE_HARVEST, STAGE_RECON_GROUND, STAGE_SPREAD_XVI, and STAGE_TERROR_MISSION.
Referenced by CL_DisplayPopupAircraft(), MAP_GetMissionText(), MAP_GetShortMissionText(), and MAP_MapClick().
qboolean CP_SaveMissionsXML | ( | mxml_node_t * | parent | ) |
Save callback for savegames in XML Format.
[out] | parent | XML Node structure, where we write the information to |
Definition at line 1937 of file cp_missions.c.
References mission_s::active, mission_s::category, ccs, Com_GetConstVariable(), Com_RegisterConstList(), Com_UnregisterConstList(), mission_s::crashed, mission_s::data, linkedList_s::data, date_s::day, mission_s::finalDate, mapDef_s::id, mission_s::id, alienBase_s::idx, aircraft_s::idx, installation_s::idx, base_s::idx, mission_s::idx, mission_s::initialIndividualInterest, mission_s::initialOverallInterest, INTERESTCATEGORY_BASE_ATTACK, INTERESTCATEGORY_BUILDING, INTERESTCATEGORY_INTERCEPT, INTERESTCATEGORY_RESCUE, INTERESTCATEGORY_SUPPLY, mission_s::location, mission_s::mapDef, ccs_s::missions, mxml_AddBool(), mxml_AddBoolValue(), mxml_AddDate(), mxml_AddInt(), mxml_AddNode(), mxml_AddPos2(), mxml_AddShort(), mxml_AddString(), linkedList_s::next, mission_s::onGeoscape, mission_s::onlose, mission_s::onwin, mission_s::pos, mission_s::posAssigned, qtrue, SAVE_INTERESTCAT_NAMESPACE, SAVE_MISSIONS, SAVE_MISSIONS_ACTIVE, SAVE_MISSIONS_ALIENBASEINDEX, SAVE_MISSIONS_BASEINDEX, SAVE_MISSIONS_CATEGORY, SAVE_MISSIONS_CRASHED, SAVE_MISSIONS_CRASHED_AIRCRAFT, SAVE_MISSIONS_FINALDATE, SAVE_MISSIONS_ID, SAVE_MISSIONS_INITIALINDIVIDUALINTEREST, SAVE_MISSIONS_INITIALOVERALLINTEREST, SAVE_MISSIONS_INSTALLATIONINDEX, SAVE_MISSIONS_LOCATION, SAVE_MISSIONS_MAPDEF_ID, SAVE_MISSIONS_MAPDEFTIMES, SAVE_MISSIONS_MISSION, SAVE_MISSIONS_MISSION_IDX, SAVE_MISSIONS_ONGEOSCAPE, SAVE_MISSIONS_ONLOSE, SAVE_MISSIONS_ONWIN, SAVE_MISSIONS_POS, SAVE_MISSIONS_POSASSIGNED, SAVE_MISSIONS_STAGE, SAVE_MISSIONS_STARTDATE, SAVE_MISSIONS_UFO, SAVE_MISSIONSTAGE_NAMESPACE, saveInterestConstants, saveMissionConstants, date_s::sec, mission_s::stage, STAGE_BASE_ATTACK, STAGE_INTERCEPT, STAGE_MISSION_GOTO, mission_s::startDate, mapDef_s::timesAlreadyUsed, mission_s::ufo, and ccs_s::ufos.
Referenced by SAV_Init().
static int CP_SelectNewMissionType | ( | void | ) | [static] |
Select new mission type.
Definition at line 1651 of file cp_missions.c.
References ccs, frand(), i, ccs_s::interest, and INTERESTCATEGORY_MAX.
Referenced by CP_SpawnNewMissions().
static void CP_SetAlienEquipmentByInterest | ( | const mission_t * | mission | ) | [static] |
Set alien equipment for a mission (depends on the interest values).
Definition at line 232 of file cp_missions.c.
References battleParam_s::alienEquipment, ccs_s::battleParameters, ccs, Com_DPrintf(), Com_Error(), Com_sprintf(), CP_IsAlienEquipmentSelectable(), csi, DEBUG_CLIENT, csi_s::eds, ERR_DROP, i, mission_s::id, equipDef_s::name, and csi_s::numEDs.
Referenced by CP_CreateAlienTeam().
static void CP_SetAlienTeamByInterest | ( | const mission_t * | mission | ) | [static] |
Sets the alien races used for a mission.
[in] | mission | Pointer to the mission. |
Definition at line 167 of file cp_missions.c.
References ccs_s::alienCategories, battleParam_s::alienTeamGroup, alienTeamCategory_s::alienTeamGroups, ccs_s::battleParameters, mission_s::category, ccs, Com_Error(), CP_IsAlienTeamForCategory(), ERR_DROP, i, mission_s::id, mission_s::initialOverallInterest, alienTeamGroup_s::maxInterest, alienTeamGroup_s::minInterest, ccs_s::numAlienCategories, and alienTeamCategory_s::numAlienTeamGroups.
Referenced by CP_CreateAlienTeam().
static void CP_SetMissionName | ( | mission_t * | mission | ) | [inline, static] |
Set mission name.
[out] | mission | The mission to set the name for |
Definition at line 1576 of file cp_missions.c.
References mission_s::category, ccs, Com_sprintf(), CP_GetMissionByIDSilent(), mission_s::id, mission_s::initialOverallInterest, and ccs_s::missions.
Referenced by CP_CreateNewMission().
void CP_SetMissionVars | ( | const mission_t * | mission | ) |
Set some needed cvars from mission definition.
[in] | mission | mission definition pointer with the needed data to set the cvars to |
Definition at line 60 of file cp_missions.c.
References battleParam_s::alienEquipment, battleParam_s::aliens, battleParam_s::alienTeamGroup, alienTeamGroup_s::alienTeams, csi_s::alienTeams, ccs_s::battleParameters, ccs, battleParam_s::civilians, battleParam_s::civTeam, Com_DPrintf(), csi, Cvar_Set(), Cvar_SetValue(), DEBUG_CLIENT, i, mission_s::mapDef, alienTeamGroup_s::numAlienTeams, and csi_s::numAlienTeams.
Referenced by CP_StartSelectedMission().
void CP_SpawnCrashSiteMission | ( | aircraft_t * | ufo | ) |
Spawn a new crash site after a UFO has been destroyed.
Definition at line 1338 of file cp_missions.c.
References _, ccs, Com_Error(), Com_Printf(), Com_sprintf(), CP_ChooseMap(), CP_MissionAddToGeoscape(), CP_MissionRemove(), CP_UFORemoveFromGeoscape(), mission_s::crashed, ccs_s::date, Date_Add(), Date_Random(), ERR_DROP, mission_s::finalDate, aircraft_s::id, mission_s::location, MAP_GetNation(), mission_s::mapDef, aircraft_s::mission, nation_s::name, mission_s::pos, aircraft_s::pos, mission_s::posAssigned, qfalse, qtrue, and Vector2Copy.
Referenced by AIRFIGHT_ActionsAfterAirfight().
void CP_SpawnNewMissions | ( | void | ) |
Spawn new missions.
Definition at line 1672 of file cp_missions.c.
References AB_GetAlienBaseNumber(), ccs, CL_ChangeIndividualInterest(), Com_DPrintf(), CP_CreateNewMission(), CP_SelectNewMissionType(), DEBUG_CLIENT, DELAY_BETWEEN_MISSION_SPAWNING, f, FINAL_OVERALL_INTEREST, frand(), i, INITIAL_OVERALL_INTEREST, int(), INTERESTCATEGORY_SUPPLY, ccs_s::lastMissionSpawnedDelay, MAXIMUM_MISSIONS_PER_CYCLE, MINIMUM_MISSIONS_PER_CYCLE, NON_OCCURRENCE_PROBABILITY, ccs_s::overallInterest, qfalse, and type.
Referenced by CL_CampaignRun(), and CP_InitializeSpawningDelay().
void CP_SpawnRescueMission | ( | aircraft_t * | aircraft, | |
aircraft_t * | ufo | |||
) |
Spawn a new rescue mission for a crashed aircraft.
[in] | aircraft | The crashed aircraft to spawn the rescue mission for. |
[in] | ufo | The UFO that shot down the phalanx aircraft, can also be NULL if the UFO was destroyed, too or left already. |
Definition at line 1385 of file cp_missions.c.
References _, aircraft_s::acTeam, AIR_CRASHED, AIR_GetNextFromBase(), AIR_RemoveEmployee(), AIR_RemovePilotFromAssignedAircraft(), AIR_UpdateHangarCapForAll(), base_s::aircraftCurrent, ccs, Com_Error(), Com_sprintf(), CP_ChooseMap(), CP_CreateNewMission(), CP_MissionAddToGeoscape(), CP_MissionRemove(), linkedList_s::data, mission_s::data, ccs_s::date, Date_Add(), Date_Random(), E_DeleteEmployee(), EMPL_PILOT, ERR_DROP, mission_s::finalDate, aircraft_s::homebase, INTERESTCATEGORY_RESCUE, mission_s::location, MAP_GetNation(), mission_s::mapDef, nation_s::name, linkedList_s::next, aircraft_s::pilot, mission_s::pos, aircraft_s::pos, mission_s::posAssigned, qfalse, qtrue, ccs_s::selectedAircraft, mission_s::stage, STAGE_TERROR_MISSION, aircraft_s::status, mission_s::ufo, and Vector2Copy.
Referenced by AIRFIGHT_ActionsAfterAirfight().
void CP_StartMissionMap | ( | mission_t * | mission | ) |
Select the mission type and start the map from mission definition.
[in] | mission | Mission definition to start the map from |
Definition at line 96 of file cp_missions.c.
References B_AssembleMap(), ccs_s::battleParameters, mission_s::category, Cbuf_AddText(), ccs, cls, Com_Error(), Com_Printf(), client_static_s::currentMD, Cvar_Set(), mission_s::data, ERR_DROP, mapDef_s::hurtAliens, mission_s::id, INTERESTCATEGORY_BASE_ATTACK, mapDef_s::map, MAP_IsNight(), mission_s::mapDef, rendererData_t::mapZone, mapDef_s::param, battleParam_s::param, mission_s::pos, qfalse, qtrue, refdef, SAV_QuickSave(), UI_InitStack(), va(), and battleParam_s::zoneType.
Referenced by CP_StartSelectedMission().
static qboolean CP_TransferOfAliensToOtherBaseNeeded | ( | const base_t * | base, | |
const missionResults_t * | missionResults | |||
) | [inline, static] |
Checks whether aliens can be stored on a base or should be transfered to another.
[in] | base | Pointer to the base to check if alien contaiment exists and have enough space |
[in] | missionResults | Pointer to the mission result struct to get captured alien numbers |
Definition at line 1164 of file cp_missions.c.
References AC_ContainmentAllowed(), AL_CheckAliveFreeSpace(), missionResults_s::aliensKilled, and missionResults_s::aliensStunned.
Referenced by CP_MissionEnd().
void CP_UFOProceedMission | ( | aircraft_t * | ufo | ) |
Make UFO proceed with its mission when the fight with another aircraft is over (and UFO survived).
[in] | ufo | Pointer to the ufo that should proceed a mission. |
Definition at line 1313 of file cp_missions.c.
References AIR_TRANSIT, AIRFIGHT_ChooseWeapon(), AIRFIGHT_WEAPON_CAN_NEVER_SHOOT, mission_s::category, CP_MissionStageEnd(), mission_s::data, INTERESTCATEGORY_INTERCEPT, aircraft_s::maxWeapons, aircraft_s::mission, mission_s::pos, aircraft_s::pos, mission_s::stage, STAGE_MISSION_GOTO, STAGE_RETURN_TO_ORBIT, aircraft_s::status, UFO_SendToDestination(), UFO_SetRandomDest(), and aircraft_s::weapons.
Referenced by AIRFIGHT_ActionsAfterAirfight(), AIRFIGHT_ExecuteActions(), and UFO_CheckShootBack().
Removes (temporarily or permanently) a UFO from geoscape: make it land and call notify functions.
[in] | mission | Pointer to mission. |
[in] | destroyed | True if the UFO has been destroyed, false if it's only landed. |
Definition at line 883 of file cp_missions.c.
References AIR_AircraftsNotifyUFORemoved(), ccs, linkedList_s::data, aircraft_s::detected, aircraft_s::landed, MAP_NotifyUFORemoved(), ccs_s::missions, linkedList_s::next, aircraft_s::pos, qtrue, RADAR_CheckRadarSensored(), RADAR_NotifyUFORemoved(), mission_s::ufo, and UFO_RemoveFromGeoscape().
Referenced by CP_BaseAttackStartMission(), CP_BuildBaseSetUpBase(), CP_BuildBaseSubvertGovernment(), CP_HarvestMissionStart(), CP_MissionRemove(), CP_ReconMissionGround(), CP_SpawnCrashSiteMission(), CP_SupplySetStayAtBase(), CP_TerrorMissionStart(), and CP_XVIMissionStart().
void CP_UpdateMissionVisibleOnGeoscape | ( | void | ) |
Update all mission visible on geoscape (in base radar range).
Definition at line 859 of file cp_missions.c.
References ccs, CP_CheckMissionVisibleOnGeoscape(), CP_MissionAddToGeoscape(), CP_MissionRemoveFromGeoscape(), linkedList_s::data, MISDET_ALWAYS_DETECTED, MISDET_CANT_BE_DETECTED, ccs_s::missions, linkedList_s::next, mission_s::onGeoscape, and qfalse.
Referenced by RADAR_UpdateBaseRadarCoverage_f(), and RADAR_UpdateInstallationRadarCoverage().
int MAP_GetIDXByMission | ( | const mission_t * | mis | ) |
Find idx corresponding to mission.
Definition at line 443 of file cp_missions.c.
References mission_s::idx.
Referenced by CL_DisplayPopupAircraft(), and MAP_MapClick().
mission_t* MAP_GetMissionByIDX | ( | int | id | ) |
Find mission corresponding to idx.
Definition at line 422 of file cp_missions.c.
References ccs, Com_Printf(), linkedList_s::data, mission_s::idx, ccs_s::missions, and linkedList_s::next.
Referenced by CL_PopupAircraftClick_f(), MAP_GetMissionAngle(), and MAP_MultiSelectExecuteAction_f().
const char* MAP_GetMissionModel | ( | const mission_t * | mission | ) |
Get mission model that should be shown on the geoscape.
[in] | mission | Pointer to the mission drawn on geoscape |
Definition at line 647 of file cp_missions.c.
References mission_s::category, Com_DPrintf(), Com_Error(), mission_s::crashed, DEBUG_CLIENT, ERR_DROP, mission_s::id, INTERESTCATEGORY_ALIENBASE, INTERESTCATEGORY_BASE_ATTACK, INTERESTCATEGORY_BUILDING, INTERESTCATEGORY_HARVEST, INTERESTCATEGORY_INTERCEPT, INTERESTCATEGORY_MAX, INTERESTCATEGORY_NONE, INTERESTCATEGORY_RECON, INTERESTCATEGORY_RESCUE, INTERESTCATEGORY_SUPPLY, INTERESTCATEGORY_TERROR_ATTACK, INTERESTCATEGORY_XVI, mission_s::mapDef, and mapDef_s::storyRelated.
Referenced by MAP_DrawMapOneMission(), and MAP_UpdateGeoscapeDock().
const float MAX_CRASHEDUFO_CONDITION = 0.81f [static] |
Definition at line 47 of file cp_missions.c.
Referenced by CP_CreateBattleParameters().
const int MAX_POS_LOOP = 10 |
Maximum number of loops to choose a mission position (to avoid infinite loops)
Definition at line 43 of file cp_missions.c.
Referenced by CP_HarvestMissionGo(), CP_ReconMissionGroundGo(), and CP_TerrorMissionGo().
const float MIN_CRASHEDUFO_CONDITION = 0.2f [static] |
Condition limits for crashed UFOs - used for disassemlies
Definition at line 46 of file cp_missions.c.
Referenced by CP_CreateBattleParameters().