Campaign mission. More...
#include "../../cl_shared.h"
#include "../cp_campaign.h"
#include "../cp_alienbase.h"
#include "../cp_ufo.h"
#include "../cp_missions.h"
#include "../cp_time.h"
#include "../cp_xvi.h"
#include "../cp_alien_interest.h"
Go to the source code of this file.
Functions | |
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_SupplyMissionIsFailure (mission_t *mission) |
Supply mission is over and is a failure (from an alien point of view): change interest values. | |
static void | CP_SupplyMissionLeave (mission_t *mission) |
Supply mission ends: UFO leave earth. | |
static void | CP_SupplySetStayAtBase (mission_t *mission) |
UFO arrived on new base destination: Supply base. | |
static void | CP_SupplyGoToBase (mission_t *mission) |
Go to base position. | |
static void | CP_SupplyMissionCreate (mission_t *mission) |
Supply mission begins: UFO arrive on earth. | |
int | CP_SupplyMissionAvailableUFOs (const mission_t const *mission, ufoType_t *ufoTypes) |
Fill an array with available UFOs for supply mission type. | |
void | CP_SupplyMissionNextStage (mission_t *mission) |
Determine what action should be performed when a Supply mission stage ends. |
Campaign mission.
Definition in file cp_mission_supply.c.
static void CP_SupplyGoToBase | ( | mission_t * | mission | ) | [static] |
Go to base position.
[in,out] | mission | Pointer to the mission |
Definition at line 119 of file cp_mission_supply.c.
References AB_CheckSupplyMissionPossible(), AB_ChooseBaseToSupply(), Com_DPrintf(), CP_MissionRemove(), mission_s::data, DEBUG_CLIENT, mission_s::pos, alienBase_s::pos, mission_s::stage, STAGE_MISSION_GOTO, mission_s::ufo, UFO_SendToDestination(), and Vector2Copy.
Referenced by CP_SupplyMissionNextStage().
Fill an array with available UFOs for supply mission type.
[in] | mission | Pointer to the mission we are currently creating. |
[out] | ufoTypes | Array of ufoType_t that may be used for this mission. |
ufoTypes
Definition at line 180 of file cp_mission_supply.c.
References UFO_SUPPLY.
Referenced by CP_MissionChooseUFO().
static void CP_SupplyMissionCreate | ( | mission_t * | mission | ) | [static] |
Supply mission begins: UFO arrive on earth.
Definition at line 146 of file cp_mission_supply.c.
References AB_CheckSupplyMissionPossible(), Com_DPrintf(), Com_Printf(), Com_UFOTypeToShortName(), CP_MissionChooseUFO(), CP_MissionDisableTimeLimit(), CP_MissionRemove(), DEBUG_CLIENT, mission_s::stage, STAGE_COME_FROM_ORBIT, mission_s::ufo, UFO_AddToGeoscape(), and UFO_MAX.
Referenced by CP_SupplyMissionNextStage().
void CP_SupplyMissionIsFailure | ( | mission_t * | mission | ) |
Supply mission is over and is a failure (from an alien point of view): change interest values.
Definition at line 56 of file cp_mission_supply.c.
References CL_ChangeIndividualInterest(), CP_MissionRemove(), f, INTERESTCATEGORY_BASE_ATTACK, INTERESTCATEGORY_INTERCEPT, and INTERESTCATEGORY_SUPPLY.
Referenced by CP_MissionIsOver().
void CP_SupplyMissionIsSuccess | ( | mission_t * | mission | ) |
Supply mission is over and is a success (from an alien point of view): change interest values.
Definition at line 39 of file cp_mission_supply.c.
References CL_ChangeIndividualInterest(), CP_MissionRemove(), CP_SpreadXVIAtPos(), mission_s::data, f, INTERESTCATEGORY_SUPPLY, and alienBase_s::pos.
Referenced by CP_MissionIsOver(), and CP_SupplyMissionNextStage().
static void CP_SupplyMissionLeave | ( | mission_t * | mission | ) | [static] |
Supply mission ends: UFO leave earth.
Definition at line 69 of file cp_mission_supply.c.
References CP_MissionDisableTimeLimit(), mission_s::data, aircraft_s::landed, qfalse, mission_s::stage, STAGE_RETURN_TO_ORBIT, mission_s::ufo, and UFO_SetRandomDest().
Referenced by CP_SupplyMissionNextStage().
void CP_SupplyMissionNextStage | ( | mission_t * | mission | ) |
Determine what action should be performed when a Supply mission stage ends.
[in] | mission | Pointer to the mission which stage ended. |
Definition at line 193 of file cp_mission_supply.c.
References Com_Printf(), CP_MissionRemove(), CP_SupplyGoToBase(), CP_SupplyMissionCreate(), CP_SupplyMissionIsSuccess(), CP_SupplyMissionLeave(), CP_SupplySetStayAtBase(), mission_s::stage, STAGE_COME_FROM_ORBIT, STAGE_MISSION_GOTO, STAGE_NOT_ACTIVE, STAGE_RETURN_TO_ORBIT, and STAGE_SUPPLY.
Referenced by CP_MissionStageEnd().
static void CP_SupplySetStayAtBase | ( | mission_t * | mission | ) | [static] |
UFO arrived on new base destination: Supply base.
[in,out] | mission | Pointer to the mission |
< Max time needed to supply base
Definition at line 88 of file cp_mission_supply.c.
References AB_CheckSupplyMissionPossible(), AB_SupplyBase(), ccs, Com_DPrintf(), CP_MissionRemove(), CP_UFORemoveFromGeoscape(), mission_s::data, ccs_s::date, Date_Add(), Date_Random(), DEBUG_CLIENT, aircraft_s::detected, mission_s::finalDate, qfalse, mission_s::stage, STAGE_SUPPLY, and mission_s::ufo.
Referenced by CP_SupplyMissionNextStage().