Alien interest values influence the campaign actions. More...
#include "../cl_shared.h"
#include "cp_campaign.h"
#include "cp_alien_interest.h"
#include "save/save_interest.h"
Go to the source code of this file.
Functions | |
void | CL_ResetAlienInterest (void) |
Initialize alien interest values and mission cycle. | |
void | CL_ChangeIndividualInterest (float interestFactor, interestCategory_t category) |
Change individual interest value. | |
void | CP_IncreaseAlienInterest (void) |
Increase alien overall interest. | |
qboolean | CP_SaveInterestsXML (mxml_node_t *parent) |
Save callback for savegames in XML Format. | |
qboolean | CP_LoadInterestsXML (mxml_node_t *parent) |
Load callback for savegames in XML Format. |
Alien interest values influence the campaign actions.
Definition in file cp_alien_interest.c.
void CL_ChangeIndividualInterest | ( | float | interestFactor, | |
interestCategory_t | category | |||
) |
Change individual interest value.
[in] | interestFactor | Maybe pe > 0 or < 0 |
[in] | category | Category of interest for aliens that should increase / decrease |
Definition at line 55 of file cp_alien_interest.c.
References ccs, Com_Printf(), f, int(), ccs_s::interest, INTERESTCATEGORY_MAX, and ccs_s::overallInterest.
Referenced by CP_BaseAttackMissionIsFailure(), CP_BaseAttackMissionIsSuccess(), CP_BaseAttackMissionOnSpawn(), CP_BuildBaseMissionBaseDestroyed(), CP_BuildBaseMissionIsFailure(), CP_BuildBaseMissionIsSuccess(), CP_BuildBaseMissionOnSpawn(), CP_HarvestMissionIsFailure(), CP_HarvestMissionIsSuccess(), CP_InterceptMissionIsFailure(), CP_InterceptMissionIsSuccess(), CP_ReconMissionIsFailure(), CP_ReconMissionIsSuccess(), CP_SpawnNewMissions(), CP_SupplyMissionIsFailure(), CP_SupplyMissionIsSuccess(), CP_TerrorMissionIsFailure(), CP_TerrorMissionIsSuccess(), CP_TerrorMissionOnSpawn(), CP_XVIMissionIsFailure(), and CP_XVIMissionIsSuccess().
void CL_ResetAlienInterest | ( | void | ) |
Initialize alien interest values and mission cycle.
Definition at line 36 of file cp_alien_interest.c.
References ccs, i, INITIAL_OVERALL_INTEREST, ccs_s::interest, INTERESTCATEGORY_MAX, INTERESTCATEGORY_RECON, ccs_s::lastInterestIncreaseDelay, ccs_s::lastMissionSpawnedDelay, and ccs_s::overallInterest.
Referenced by CP_CampaignInit().
void CP_IncreaseAlienInterest | ( | void | ) |
Increase alien overall interest.
Definition at line 94 of file cp_alien_interest.c.
References ccs, ccs_s::curCampaign, campaign_s::difficulty, HOURS_PER_ONE_INTEREST, ccs_s::lastInterestIncreaseDelay, and ccs_s::overallInterest.
Referenced by CL_CampaignRun().
qboolean CP_LoadInterestsXML | ( | mxml_node_t * | parent | ) |
Load callback for savegames in XML Format.
[in] | parent | XML Node structure, where we get the information from |
Definition at line 133 of file cp_alien_interest.c.
References ccs, Com_GetConstInt(), Com_Printf(), Com_RegisterConstList(), Com_UnregisterConstList(), ccs_s::interest, ccs_s::lastInterestIncreaseDelay, ccs_s::lastMissionSpawnedDelay, mxml_GetInt(), mxml_GetNextNode(), mxml_GetNode(), mxml_GetString(), ccs_s::overallInterest, qfalse, qtrue, SAVE_INTERESTS, SAVE_INTERESTS_ID, SAVE_INTERESTS_INTEREST, SAVE_INTERESTS_LASTINCREASEDELAY, SAVE_INTERESTS_LASTMISSIONSPAWNEDDELAY, SAVE_INTERESTS_OVERALL, SAVE_INTERESTS_VAL, and saveInterestConstants.
Referenced by SAV_Init().
qboolean CP_SaveInterestsXML | ( | mxml_node_t * | parent | ) |
Save callback for savegames in XML Format.
[out] | parent | XML Node structure, where we write the information to |
Definition at line 111 of file cp_alien_interest.c.
References ccs, Com_GetConstVariable(), Com_RegisterConstList(), Com_UnregisterConstList(), i, ccs_s::interest, INTERESTCATEGORY_MAX, ccs_s::lastInterestIncreaseDelay, ccs_s::lastMissionSpawnedDelay, mxml_AddNode(), mxml_AddShort(), mxml_AddShortValue(), mxml_AddString(), ccs_s::overallInterest, qtrue, SAVE_INTERESTCAT_NAMESPACE, SAVE_INTERESTS, SAVE_INTERESTS_ID, SAVE_INTERESTS_INTEREST, SAVE_INTERESTS_LASTINCREASEDELAY, SAVE_INTERESTS_LASTMISSIONSPAWNEDDELAY, SAVE_INTERESTS_OVERALL, SAVE_INTERESTS_VAL, and saveInterestConstants.
Referenced by SAV_Init().