|
UFO: Alien Invasion
|
Campaign mission. More...
#include "../../../DateTime.h"#include "../../../cl_shared.h"#include "../cp_campaign.h"#include "../cp_ufo.h"#include "../cp_missions.h"#include "../cp_time.h"#include "../cp_alien_interest.h"#include "../cp_xvi.h"#include "cp_mission_intercept.h"
Go to the source code of this file.
Macros | |
| #define | UFO_EPSILON 0.00001f |
Functions | |
| void | CP_InterceptMissionIsSuccess (mission_t *mission) |
| Intercept mission is over and is a success: change interest values. | |
| void | CP_InterceptMissionIsFailure (mission_t *mission) |
| Intercept mission is over and is a failure: change interest values. | |
| void | CP_InterceptMissionLeave (mission_t *mission, bool destroyed) |
| Intercept mission ends: UFO leave earth. | |
| static void | CP_InterceptAttackInstallation (mission_t *mission) |
| UFO starts to attack the installation. | |
| void | CP_InterceptAircraftMissionSet (mission_t *mission) |
| Set Intercept mission: UFO looks for new aircraft target. | |
| static installation_t * | CP_InterceptChooseInstallation (const mission_t *mission) |
| Choose Base that will be attacked, and add it to mission description. | |
| void | CP_InterceptGoToInstallation (mission_t *mission) |
| Set Intercept mission: UFO chooses an installation an flies to it. | |
| static void | CP_InterceptMissionSet (mission_t *mission) |
| Set Intercept mission: choose between attacking aircraft or installations. | |
| void | CP_InterceptNextStage (mission_t *mission) |
| Determine what action should be performed when a Intercept mission stage ends. | |
Campaign mission.
Definition in file cp_mission_intercept.cpp.
| #define UFO_EPSILON 0.00001f |
Definition at line 64 of file cp_mission_intercept.cpp.
Referenced by CP_InterceptAttackInstallation(), and CP_InterceptMissionLeave().
Set Intercept mission: UFO looks for new aircraft target.
Definition at line 127 of file cp_mission_intercept.cpp.
References ccs, Date_Random(), mission_t::finalDate, mission_t::stage, and STAGE_INTERCEPT.
Referenced by CP_InterceptMissionSet().
UFO starts to attack the installation.
Definition at line 102 of file cp_mission_intercept.cpp.
References ccs, mission_t::data, Date_Random(), mission_t::finalDate, mission_t::missionData_t::installation, installation_t::pos, mission_t::pos, mission_t::stage, STAGE_INTERCEPT, mission_t::ufo, UFO_EPSILON, UFO_SetRandomDestAround(), Vector2Copy, and VectorCompareEps().
Referenced by CP_InterceptNextStage().
|
static |
Choose Base that will be attacked, and add it to mission description.
Definition at line 141 of file cp_mission_intercept.cpp.
References frand(), i, and INS_Foreach.
Referenced by CP_InterceptGoToInstallation().
Set Intercept mission: UFO chooses an installation an flies to it.
Definition at line 171 of file cp_mission_intercept.cpp.
References cgi, CP_InterceptChooseInstallation(), CP_MissionDisableTimeLimit(), CP_MissionRemove(), mission_t::data, mission_t::missionData_t::installation, installation_t::pos, mission_t::pos, mission_t::posAssigned, mission_t::stage, STAGE_MISSION_GOTO, mission_t::ufo, UFO_SendToDestination(), and Vector2Copy.
Referenced by CP_InterceptMissionSet().
Intercept mission is over and is a failure: change interest values.
Definition at line 54 of file cp_mission_intercept.cpp.
References CP_MissionRemove(), INT_ChangeIndividualInterest(), INTERESTCATEGORY_BASE_ATTACK, INTERESTCATEGORY_BUILDING, INTERESTCATEGORY_INTERCEPT, and INTERESTCATEGORY_TERROR_ATTACK.
Referenced by CP_MissionIsOver().
Intercept mission is over and is a success: change interest values.
Definition at line 39 of file cp_mission_intercept.cpp.
References CP_IsXVIStarted, CP_MissionRemove(), INT_ChangeIndividualInterest(), 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 72 of file cp_mission_intercept.cpp.
References CP_MissionDisableTimeLimit(), CP_MissionRemoveFromGeoscape(), mission_t::data, INS_DestroyInstallation(), mission_t::missionData_t::installation, aircraft_t::landed, installation_t::pos, mission_t::pos, mission_t::stage, STAGE_RETURN_TO_ORBIT, mission_t::ufo, UFO_EPSILON, UFO_SetRandomDest(), Vector2Copy, and VectorCompareEps().
Referenced by CP_InterceptNextStage(), and CP_MissionNotifyInstallationDestroyed().
Set Intercept mission: choose between attacking aircraft or installations.
Definition at line 197 of file cp_mission_intercept.cpp.
References CP_InterceptAircraftMissionSet(), CP_InterceptGoToInstallation(), frand(), aircraft_t::getUfoType(), INS_HasAny(), mission_t::stage, STAGE_MISSION_GOTO, mission_t::ufo, and UFO_CanDoMission().
Referenced by CP_InterceptNextStage().
Determine what action should be performed when a Intercept mission stage ends.
| [in] | mission | Pointer to the mission which stage ended. |
Definition at line 220 of file cp_mission_intercept.cpp.
References AIR_UFO, AIRFIGHT_ChooseWeapon(), AIRFIGHT_WEAPON_CAN_NEVER_SHOOT, ccs, cgi, CP_InterceptAttackInstallation(), CP_InterceptMissionIsSuccess(), CP_InterceptMissionLeave(), CP_InterceptMissionSet(), CP_MissionBegin(), CP_MissionRemove(), mission_t::data, mission_t::finalDate, mission_t::missionData_t::installation, aircraft_t::maxWeapons, aircraft_t::pos, mission_t::stage, STAGE_COME_FROM_ORBIT, STAGE_INTERCEPT, STAGE_MISSION_GOTO, STAGE_NOT_ACTIVE, STAGE_RETURN_TO_ORBIT, aircraft_t::status, mission_t::ufo, and aircraft_t::weapons.
Referenced by CP_MissionStageEnd(), and TEST_F().