26 #include "../../../cl_shared.h"
27 #include "../cp_campaign.h"
28 #include "../cp_alienbase.h"
29 #include "../cp_geoscape.h"
30 #include "../cp_ufo.h"
31 #include "../cp_missions.h"
32 #include "../cp_time.h"
33 #include "../cp_xvi.h"
34 #include "../cp_alien_interest.h"
108 const date_t minReconDelay = {1, 0};
109 const date_t reconDelay = {2, 0};
111 assert(mission->
ufo);
146 if (counter >= MAX_POS_LOOP) {
147 cgi->Com_Printf(
"CP_ReconMissionGroundGo: Error, could not set position.\n");
152 cgi->Com_Printf(
"CP_ReconMissionGroundGo: No map found, remove mission.\n");
172 const date_t minMissionDelay = {2, 0};
173 const date_t missionDelay = {3, 0};
226 switch (mission->
stage) {
249 cgi->Com_Printf(
"CP_ReconMissionNextStage: Unknown stage: %i, removing mission.\n", mission->
stage);
static void CP_ReconMissionIsSuccess(mission_t *mission)
Recon mission is over and is a success: change interest values.
void UFO_SetRandomDest(aircraft_t *ufocraft)
Give a random destination to the given UFO, and make him to move there.
static void CP_ReconMissionSelect(mission_t *mission)
Set recon mission type (aerial or ground).
bool CP_ChooseMap(mission_t *mission, const vec2_t pos)
Choose a map for given mission.
void CP_ReconMissionGroundGo(mission_t *mission)
Set ground mission, and go to ground mission pos.
linkedList_t * populations
void INT_ChangeIndividualInterest(float interestFactor, interestCategory_t category)
Change individual interest value.
void CP_ReconMissionIsFailure(mission_t *mission)
Recon mission is over and is a failure: change interest values.
void CP_ReconMissionLeave(mission_t *mission)
Recon mission ends: UFO leave earth.
int AB_GetAlienBaseNumber(void)
Check number of alien bases.
base_t * GEO_PositionCloseToBase(const vec2_t pos)
Check if given pos is close to an existing base.
const cgame_import_t * cgi
bool CP_MissionBegin(mission_t *mission)
mission begins: UFO arrive on earth.
void CP_MissionRemove(mission_t *mission)
Removes a mission from mission global array.
void CP_MissionAddToGeoscape(mission_t *mission, bool force)
Add a mission to geoscape: make it visible and stop time.
Engine-side time information in the game.
static void CP_ReconMissionGround(mission_t *mission)
Start ground mission.
date_t Date_Add(date_t a, const date_t &b)
Add two dates and return the result.
bool CP_GetRandomPosOnGeoscapeWithParameters(vec2_t pos, const linkedList_t *terrainTypes, const linkedList_t *cultureTypes, const linkedList_t *populationTypes, const linkedList_t *nations)
Determines a random position on geoscape that fulfills certain criteria given via parameters...
static bool CP_ReconMissionChoose(mission_t *mission)
Choose between aerial and ground mission.
void CP_ReconMissionNextStage(mission_t *mission)
Determine what action should be performed when a Recon mission stage ends.
Campaign mission headers.
static bool CP_ReconMissionNewGroundMission(mission_t *mission)
Choose if a new ground mission should be started.
float frand(void)
Return random values between 0 and 1.
void CP_UFORemoveFromGeoscape(mission_t *mission, bool destroyed)
Removes (temporarily or permanently) a UFO from geoscape: make it land and call notify functions...
void UFO_SendToDestination(aircraft_t *ufo, const vec2_t dest)
Make the specified UFO go to destination.
void CP_ReconMissionAerial(mission_t *mission)
Set aerial mission.
date_t Date_Random(date_t minFrame, date_t maxFrame)
Return a random relative date which lies between a lower and upper limit.
void CP_MissionRemoveFromGeoscape(mission_t *mission)
Removes a mission from geoscape: make it non visible and call notify functions.
void CP_MissionDisableTimeLimit(mission_t *mission)
Disable time limit for given mission.
#define CP_IsXVIStarted()