Campaign missions headers. More...
#include "missions/cp_mission_baseattack.h"
#include "missions/cp_mission_buildbase.h"
#include "missions/cp_mission_harvest.h"
#include "missions/cp_mission_intercept.h"
#include "missions/cp_mission_recon.h"
#include "missions/cp_mission_supply.h"
#include "missions/cp_mission_terror.h"
#include "missions/cp_mission_xvi.h"
Go to the source code of this file.
Defines | |
#define | UFO_EPSILON 0.00001f |
Functions | |
void | CP_SetMissionVars (const mission_t *mission) |
Set some needed cvars from mission definition. | |
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. | |
void | CP_StartMissionMap (mission_t *mission) |
Select the mission type and start the map from mission definition. | |
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. | |
const char * | CP_MissionToTypeString (const mission_t *mission) |
Return the type of mission. | |
int | MAP_GetIDXByMission (const mission_t *mis) |
Find idx corresponding to mission. | |
mission_t * | MAP_GetMissionByIDX (int id) |
Find mission corresponding to idx. | |
void | CP_MissionRemove (mission_t *mission) |
Removes a mission from mission global array. | |
qboolean | CP_MissionBegin (mission_t *mission) |
mission begins: UFO arrive on earth. | |
qboolean | CP_CheckNewMissionDetectedOnGeoscape (void) |
Check if mission has been detected by radar. | |
qboolean | CP_CheckMissionLimitedInTime (const mission_t *mission) |
Check if mission should end because of limited time. | |
void | CP_MissionDisableTimeLimit (mission_t *mission) |
Disable time limit for given mission. | |
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. | |
const char * | MAP_GetMissionModel (const mission_t *mission) |
Get mission model that should be shown on the geoscape. | |
void | CP_MissionRemoveFromGeoscape (mission_t *mission) |
Removes a mission from geoscape: make it non visible and call notify functions. | |
void | CP_MissionAddToGeoscape (mission_t *mission, qboolean force) |
Add a mission to geoscape: make it visible and stop time. | |
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_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. | |
ufoType_t | CP_MissionChooseUFO (const mission_t *mission) |
Choose UFO type for a given mission category. | |
void | CP_MissionStageEnd (mission_t *mission) |
Determine what action should be performed when a mission stage ends. | |
void | CP_InitializeSpawningDelay (void) |
Initialize spawning delay. | |
void | CP_MissionsInit (void) |
void | CP_SpawnNewMissions (void) |
Spawn new missions. | |
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. | |
void | CP_MissionEnd (mission_t *mission, qboolean won) |
void | CP_MissionEndActions (mission_t *mission, aircraft_t *aircraft, qboolean won) |
Actions to be done after mission finished. | |
Variables | |
const int | MAX_POS_LOOP |
Campaign missions headers.
Definition in file cp_missions.h.
#define UFO_EPSILON 0.00001f |
Definition at line 38 of file cp_missions.h.
Referenced by CP_InterceptAttackInstallation(), CP_InterceptMissionLeave(), and MAP_MapCalcLine().
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().
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().
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().
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().
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().
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().
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().
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().
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 int MAX_POS_LOOP |
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().