80 const DateTime minMissionDelay(2, 0);
81 const DateTime maxMissionDelay(3, 0);
99 if (
ccs.numCities > 0) {
100 const int randnumber = rand() %
ccs.numCities;
102 return (
city_t*)
cgi->LIST_GetByIdx(
ccs.cities, randnumber);
155 cgi->Com_DPrintf(
DEBUG_CLIENT,
"CP_TerrorMissionGo: Could not set position.\n");
175 switch (mission->
stage) {
197 cgi->Com_Printf(
"CP_TerrorMissionNextStage: 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_BASE_ATTACK
@ INTERESTCATEGORY_BUILDING
@ INTERESTCATEGORY_TERROR_ATTACK
@ INTERESTCATEGORY_INTERCEPT
@ INTERESTCATEGORY_HARVEST
Header file for single player campaign control.
const cgame_import_t * cgi
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.
Campaign mission headers.
void CP_TerrorMissionIsFailure(mission_t *mission)
Terror attack mission is over and is a failure: change interest values.
static const mission_t * CP_TerrorInCity(const city_t *city)
void CP_TerrorMissionStart(mission_t *mission)
Start Terror attack mission.
static void CP_TerrorMissionGo(mission_t *mission)
Set Terror attack mission, and go to Terror attack mission pos.
static city_t * CP_ChooseCity(void)
Choose a city for terror mission.
void CP_TerrorMissionIsSuccess(mission_t *mission)
Terror attack mission is over and is a success: change interest values.
void CP_TerrorMissionOnSpawn(void)
Run when the mission is spawned.
void CP_TerrorMissionNextStage(mission_t *mission)
Determine what action should be performed when a Terror attack mission stage ends.
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_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.
#define MIS_Foreach(var)
iterates through missions
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.
union mission_t::missionData_t data
#define Vector2Equal(a, b)
#define Vector2Copy(src, dest)