UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cp_mission_baseattack.h File Reference

Campaign mission headers. More...

Go to the source code of this file.

Functions

void CP_BaseAttackStartMission (struct mission_s *mission)
 Start Base Attack. More...
 
void CP_BaseAttackMissionLeave (struct mission_s *mission)
 Base attack mission ends: UFO leave earth. More...
 
void CP_BaseAttackMissionIsSuccess (struct mission_s *mission)
 Base attack mission is over and is a success (from an alien point of view): change interest values. More...
 
void CP_BaseAttackMissionIsFailure (struct mission_s *mission)
 Base attack mission is over and is a failure (from an alien point of view): change interest values. More...
 
void CP_BaseAttackMissionOnSpawn (void)
 Run when the mission is spawned. More...
 
void CP_BaseAttackMissionNextStage (struct mission_s *mission)
 Determine what action should be performed when a Base Attack mission stage ends. More...
 
void CP_BaseAttackMissionDestroyBase (struct mission_s *mission)
 Base attack mission ends: UFO leave earth. More...
 
void CP_CheckBaseAttacks (void)
 Check and start baseattack missions. More...
 

Detailed Description

Campaign mission headers.

Definition in file cp_mission_baseattack.h.

Function Documentation

void CP_BaseAttackMissionDestroyBase ( mission_t mission)

Base attack mission ends: UFO leave earth.

Note
Base attack mission – Stage 3
UFO attacking this base will be redirected when notify function will be called, don't set new destination here.

Definition at line 120 of file cp_mission_baseattack.cpp.

References _, aircraft_s::acTeam, base_s::aircraftCurrent, B_Destroy(), mission_s::missionData_t::base, BASE_WORKING, base_s::baseStatus, CAP_UpdateStorageCap(), cgi, Com_sprintf(), CP_GameTimeStop(), cp_messageBuffer, mission_s::data, GEO_SetMissionAircraft, aircraft_s::mission, MS_AddNewMessage(), and base_s::name.

Referenced by CP_BaseAttackMissionNextStage(), CP_BaseAttackStartMission(), and CP_MissionEndActions().

void CP_BaseAttackMissionIsSuccess ( mission_t mission)

Base attack mission is over and is a success (from an alien point of view): change interest values.

Note
Base attack mission
See also
CP_BaseAttackMissionStart

Definition at line 49 of file cp_mission_baseattack.cpp.

References CP_MissionRemove(), f, INT_ChangeIndividualInterest(), INTERESTCATEGORY_HARVEST, INTERESTCATEGORY_INTERCEPT, INTERESTCATEGORY_RECON, and INTERESTCATEGORY_TERROR_ATTACK.

Referenced by CP_BaseAttackMissionNextStage(), and CP_MissionIsOver().

void CP_BaseAttackMissionLeave ( mission_t mission)

Base attack mission ends: UFO leave earth.

Note
Base attack mission – Stage 3

Definition at line 100 of file cp_mission_baseattack.cpp.

References ccs, CP_MissionDisableTimeLimit(), ccs_s::date, mission_s::finalDate, aircraft_s::landed, mission_s::stage, STAGE_RETURN_TO_ORBIT, mission_s::ufo, and UFO_SetRandomDest().

Referenced by CP_MissionNotifyBaseDestroyed().

void CP_BaseAttackMissionNextStage ( mission_t mission)

Determine what action should be performed when a Base Attack mission stage ends.

Parameters
[in]missionPointer to the mission which stage ended.

Definition at line 320 of file cp_mission_baseattack.cpp.

References cgi, CP_BaseAttackGoToBase(), CP_BaseAttackMissionDestroyBase(), CP_BaseAttackMissionIsSuccess(), CP_BaseAttackStartMission(), CP_MissionBegin(), CP_MissionRemove(), mission_s::stage, STAGE_BASE_ATTACK, STAGE_COME_FROM_ORBIT, STAGE_MISSION_GOTO, STAGE_NOT_ACTIVE, and STAGE_RETURN_TO_ORBIT.

Referenced by CP_MissionStageEnd().

void CP_BaseAttackMissionOnSpawn ( void  )

Run when the mission is spawned.

Definition at line 90 of file cp_mission_baseattack.cpp.

References f, INT_ChangeIndividualInterest(), and INTERESTCATEGORY_BASE_ATTACK.

Referenced by CP_CreateNewMission().

void CP_CheckBaseAttacks ( void  )

Check and start baseattack missions.

See also
CP_BaseAttackStartMission

Definition at line 237 of file cp_mission_baseattack.cpp.

References CP_BaseAttackPrepareBattle(), INTERESTCATEGORY_BASE_ATTACK, MIS_Foreach, and STAGE_BASE_ATTACK.

Referenced by CP_CampaignRun(), and SAV_GameQuickLoad_f().