Campaign mission headers. More...
Go to the source code of this file.
Functions | |
void | CP_InterceptMissionLeave (mission_t *mission, qboolean destroyed) |
Intercept mission ends: UFO leave earth. | |
int | CP_InterceptMissionAvailableUFOs (const mission_t const *mission, ufoType_t *ufoTypes) |
Fill an array with available UFOs for Intercept mission type. | |
void | CP_InterceptNextStage (mission_t *mission) |
Determine what action should be performed when a Intercept mission stage ends. | |
void | CP_InterceptMissionIsFailure (mission_t *mission) |
Intercept mission is over and is a failure: change interest values. | |
void | CP_InterceptMissionIsSuccess (mission_t *mission) |
Intercept mission is over and is a success: change interest values. | |
void | CP_InterceptGoToInstallation (mission_t *mission) |
Set Intercept mission: UFO chooses an installation an flies to it. | |
void | CP_InterceptAircraftMissionSet (mission_t *mission) |
Set Intercept mission: UFO looks for new aircraft target. |
Campaign mission headers.
Definition in file cp_mission_intercept.h.
void CP_InterceptAircraftMissionSet | ( | mission_t * | mission | ) |
Set Intercept mission: UFO looks for new aircraft target.
Definition at line 124 of file cp_mission_intercept.c.
References ccs, ccs_s::date, Date_Add(), Date_Random(), mission_s::finalDate, mission_s::stage, and STAGE_INTERCEPT.
Referenced by CP_InterceptMissionSet().
void CP_InterceptGoToInstallation | ( | mission_t * | mission | ) |
Set Intercept mission: UFO chooses an installation an flies to it.
Definition at line 173 of file cp_mission_intercept.c.
References Com_Printf(), Com_sprintf(), CP_InterceptChooseInstallation(), CP_MissionDisableTimeLimit(), CP_MissionRemove(), mission_s::data, mission_s::location, installation_s::name, mission_s::pos, installation_s::pos, mission_s::posAssigned, qtrue, mission_s::stage, STAGE_MISSION_GOTO, mission_s::ufo, UFO_SendToDestination(), and Vector2Copy.
Referenced by CP_InterceptMissionSet().
Fill an array with available UFOs for Intercept 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 220 of file cp_mission_intercept.c.
References frand(), UFO_FIGHTER, and UFO_HARVESTER.
Referenced by CP_MissionChooseUFO().
void CP_InterceptMissionIsFailure | ( | mission_t * | mission | ) |
Intercept mission is over and is a failure: change interest values.
Definition at line 53 of file cp_mission_intercept.c.
References CL_ChangeIndividualInterest(), CP_MissionRemove(), f, INTERESTCATEGORY_BASE_ATTACK, INTERESTCATEGORY_BUILDING, INTERESTCATEGORY_INTERCEPT, and INTERESTCATEGORY_TERROR_ATTACK.
Referenced by CP_MissionIsOver().
void CP_InterceptMissionIsSuccess | ( | mission_t * | mission | ) |
Intercept mission is over and is a success: change interest values.
Definition at line 38 of file cp_mission_intercept.c.
References CL_ChangeIndividualInterest(), CP_IsXVIResearched(), CP_MissionRemove(), f, INTERESTCATEGORY_HARVEST, INTERESTCATEGORY_INTERCEPT, INTERESTCATEGORY_RECON, and INTERESTCATEGORY_XVI.
Referenced by CP_InterceptNextStage(), and CP_MissionIsOver().
Intercept mission ends: UFO leave earth.
[in] | mission | Pointer to the mission |
[in] | destroyed | true if the UFO actually destroyed the installation, false else |
Definition at line 69 of file cp_mission_intercept.c.
References CP_MissionDisableTimeLimit(), CP_MissionRemoveFromGeoscape(), mission_s::data, installation_s::founded, INS_DestroyInstallation(), aircraft_s::landed, installation_s::pos, mission_s::pos, qfalse, mission_s::stage, STAGE_RETURN_TO_ORBIT, mission_s::ufo, UFO_EPSILON, UFO_SetRandomDest(), and VectorCompareEps().
Referenced by CP_InterceptNextStage(), and CP_MissionNotifyInstallationDestroyed().
void CP_InterceptNextStage | ( | mission_t * | mission | ) |
Determine what action should be performed when a Intercept mission stage ends.
[in] | mission | Pointer to the mission which stage ended. |
Definition at line 241 of file cp_mission_intercept.c.
References AIR_UFO, AIRFIGHT_ChooseWeapon(), AIRFIGHT_WEAPON_CAN_NEVER_SHOOT, ccs, Com_Printf(), CP_InterceptAttackInstallation(), CP_InterceptMissionIsSuccess(), CP_InterceptMissionLeave(), CP_InterceptMissionSet(), CP_MissionBegin(), CP_MissionRemove(), mission_s::data, ccs_s::date, Date_Add(), mission_s::finalDate, aircraft_s::maxWeapons, aircraft_s::pos, qtrue, mission_s::stage, STAGE_COME_FROM_ORBIT, STAGE_INTERCEPT, STAGE_MISSION_GOTO, STAGE_NOT_ACTIVE, STAGE_RETURN_TO_ORBIT, aircraft_s::status, mission_s::ufo, and aircraft_s::weapons.
Referenced by CP_MissionStageEnd().