25 #include "../../../cl_shared.h"
26 #include "../cp_campaign.h"
27 #include "../cp_missions.h"
28 #include "../cp_time.h"
29 #include "../cp_ufo.h"
39 const date_t minCrashDelay = {7, 0};
40 const date_t crashDelay = {14, 0};
48 cgi->Com_Error(
ERR_DROP,
"Could not find mapdef rescue");
69 assert(crashedAircraft);
73 if (crashedAircraft->
pilot)
118 switch (mission->
stage) {
129 cgi->Com_Printf(
"CP_RescueNextStage: 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.
bool CP_CheckMissionLimitedInTime(const mission_t *mission)
Check if mission should end because of limited time.
bool AIR_RemoveEmployee(Employee *employee, aircraft_t *aircraft)
Removes a soldier from an aircraft.
void CP_RescueNextStage(mission_t *mission)
Determine what action should be performed when a Rescue mission stage ends.
void CP_EndRescueMission(mission_t *mission, aircraft_t *aircraft, bool won)
Actions to be done when rescue mission finished/expired.
bool Date_LaterThan(const date_t *now, const date_t *compare)
Check whether the given date and time is later than current date.
void B_DumpAircraftToHomeBase(aircraft_t *aircraft)
Will unload all cargo to the homebase.
mapDef_t *IMPORT * Com_GetMapDefinitionByID(const char *mapDefID)
const cgame_import_t * cgi
static void CP_LeaveRescueMission(mission_t *mission)
Rescue mission expired, UFO leave 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.
date_t Date_Add(date_t a, const date_t &b)
Add two dates and return the result.
Campaign mission headers.
union mission_s::missionData_t data
static void CP_BeginRescueMission(mission_t *mission)
Actions to be done when UFO arrived at rescue mission location.
void AIR_DestroyAircraft(aircraft_t *aircraft, bool killPilot)
Removes an aircraft from its base and the game.
#define LIST_Foreach(list, type, var)
Iterates over a linked list, it's safe to delete the returned entry from the list while looping over ...
date_t Date_Random(date_t minFrame, date_t maxFrame)
Return a random relative date which lies between a lower and upper limit.
An aircraft with all it's data.
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.