26 #include "../../../cl_shared.h"
27 #include "../cp_campaign.h"
28 #include "../cp_alienbase.h"
29 #include "../cp_ufo.h"
30 #include "../cp_missions.h"
31 #include "../cp_time.h"
32 #include "../cp_xvi.h"
33 #include "../cp_alien_interest.h"
91 const date_t minSupplyTime = {3, 0};
92 const date_t supplyTime = {10, 0};
102 cgi->Com_DPrintf(
DEBUG_CLIENT,
"No base in game: removing supply mission.\n");
124 assert(mission->
ufo);
130 cgi->Com_DPrintf(
DEBUG_CLIENT,
"No base in game: removing supply mission.\n");
155 cgi->Com_DPrintf(
DEBUG_CLIENT,
"No base in game: removing supply mission.\n");
162 cgi->Com_DPrintf(
DEBUG_CLIENT,
"Supply mission can't be spawned without UFO: removing supply mission.\n");
180 switch (mission->
stage) {
202 cgi->Com_Printf(
"CP_SupplyMissionNextStage: Unknown stage: %i, removing mission.\n", mission->
stage);
void UFO_SetRandomDest(aircraft_t *ufocraft)
Give a random destination to the given UFO, and make him to move there.
void CP_SupplyMissionNextStage(mission_t *mission)
Determine what action should be performed when a Supply mission stage ends.
static void CP_SupplyMissionCreate(mission_t *mission)
Supply mission begins: UFO arrive on earth.
void INT_ChangeIndividualInterest(float interestFactor, interestCategory_t category)
Change individual interest value.
aircraft_t * UFO_AddToGeoscape(ufoType_t ufoType, const vec2_t destination, mission_t *mission)
Add a UFO to geoscape.
void CP_SupplyMissionIsSuccess(mission_t *mission)
Supply mission is over and is a success (from an alien point of view): change interest values...
void CP_SpreadXVIAtPos(const vec2_t pos)
Spread XVI at a given position.
bool AB_CheckSupplyMissionPossible(void)
Check if a supply mission is possible.
alienBase_t * AB_ChooseBaseToSupply(void)
Choose Alien Base that should be supplied.
Campaign mission headers.
ufoType_t CP_MissionChooseUFO(const mission_t *mission)
Choose UFO type for a given mission category.
const cgame_import_t * cgi
const char *IMPORT * Com_UFOTypeToShortName(ufoType_t type)
void CP_MissionRemove(mission_t *mission)
Removes a mission from mission global array.
void CP_SupplyMissionIsFailure(mission_t *mission)
Supply mission is over and is a failure (from an alien point of view): change interest values...
Engine-side time information in the game.
date_t Date_Add(date_t a, const date_t &b)
Add two dates and return the result.
union mission_s::missionData_t data
static void CP_SupplyMissionLeave(mission_t *mission)
Supply mission ends: UFO leave earth.
void CP_UFORemoveFromGeoscape(mission_t *mission, bool destroyed)
Removes (temporarily or permanently) a UFO from geoscape: make it land and call notify functions...
#define Vector2Copy(src, dest)
void UFO_SendToDestination(aircraft_t *ufo, const vec2_t dest)
Make the specified UFO go to destination.
void AB_SupplyBase(alienBase_t *base, bool decreaseStealth)
Supply a base.
date_t Date_Random(date_t minFrame, date_t maxFrame)
Return a random relative date which lies between a lower and upper limit.
static void CP_SupplyGoToBase(mission_t *mission)
Go to base position.
static void CP_SupplySetStayAtBase(mission_t *mission)
UFO arrived on new base destination: Supply base.
void CP_MissionDisableTimeLimit(mission_t *mission)
Disable time limit for given mission.