99 return (
frand() > 0.5f);
112 assert(mission->
ufo);
148 cgi->Com_Printf(
"CP_ReconMissionGroundGo: Error, could not set position.\n");
153 cgi->Com_Printf(
"CP_ReconMissionGroundGo: No map found, remove mission.\n");
176 const DateTime minMissionDelay(2, 0);
177 const DateTime maxMissionDelay(3, 0);
194 return (
frand() > 0.7f);
226 switch (mission->
stage) {
249 cgi->Com_Printf(
"CP_ReconMissionNextStage: Unknown stage: %i, removing mission.\n", mission->
stage);
DateTime class definition.
Share stuff between the different cgame implementations.
Class describing a point of time.
void INT_ChangeIndividualInterest(float interestFactor, interestCategory_t category)
Change individual interest value.
@ INTERESTCATEGORY_SUPPLY
@ INTERESTCATEGORY_TERROR_ATTACK
@ INTERESTCATEGORY_INTERCEPT
@ INTERESTCATEGORY_HARVEST
int AB_GetAlienBaseNumber(void)
Check number of alien bases.
Header file for single player campaign control.
const cgame_import_t * cgi
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.
base_t * GEO_PositionCloseToBase(const vec2_t pos)
Check if given pos is close to an existing base.
Header for Geoscape management.
void CP_ReconMissionLeave(mission_t *mission)
Recon mission ends: UFO leave earth.
void CP_ReconMissionAerial(mission_t *mission)
Set aerial mission.
static void CP_ReconMissionSelect(mission_t *mission)
Set recon mission type (aerial or ground).
static void CP_ReconMissionIsSuccess(mission_t *mission)
Recon mission is over and is a success: change interest values.
void CP_ReconMissionNextStage(mission_t *mission)
Determine what action should be performed when a Recon mission stage ends.
void CP_ReconMissionIsFailure(mission_t *mission)
Recon mission is over and is a failure: change interest values.
static void CP_ReconMissionGround(mission_t *mission)
Start ground mission.
void CP_ReconMissionGroundGo(mission_t *mission)
Set ground mission, and go to ground mission pos.
static bool CP_ReconMissionNewGroundMission(mission_t *mission)
Choose if a new ground mission should be started.
static bool CP_ReconMissionChoose(mission_t *mission)
Choose between aerial and ground mission.
Campaign mission headers.
bool CP_MissionBegin(mission_t *mission)
mission begins: UFO arrive on earth.
void CP_UFORemoveFromGeoscape(mission_t *mission, bool 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.
bool CP_ChooseMap(mission_t *mission, const vec2_t pos)
Choose a map for given mission.
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, bool force)
Add a mission to geoscape: make it visible and stop time.
void CP_MissionDisableTimeLimit(mission_t *mission)
Disable time limit for given mission.
Campaign missions headers.
DateTime Date_Random(const DateTime &minFrame, const DateTime &maxFrame)
Return a random relative date which lies between a lower and upper limit.
Campaign geoscape time header.
void UFO_SendToDestination(aircraft_t *ufo, const vec2_t dest)
Make the specified UFO go to destination.
void UFO_SetRandomDest(aircraft_t *ufocraft)
Give a random destination to the given UFO, and make him to move there.
#define CP_IsXVIStarted()
float frand(void)
Return random values between 0 and 1.
linkedList_t * populations