Most of the hospital related stuff. More...
#include "../cl_shared.h"
#include "../cl_team.h"
#include "../ui/ui_main.h"
#include "cp_campaign.h"
#include "cp_hospital.h"
Go to the source code of this file.
Defines | |
#define | GET_HP_HEALING(ab) (1 + (ab) * 15/MAX_SKILL) |
Functions | |
qboolean | HOS_HealCharacter (character_t *chr, qboolean hospital) |
Heals character. | |
void | HOS_HospitalRun (void) |
Checks health status of all employees in all bases. | |
qboolean | HOS_HealEmployee (employee_t *employee) |
Callback for HOS_HealCharacter() in hospital. | |
void | HOS_HealAll (const base_t *const base) |
Heal all employees in the given base. | |
void | HOS_InitStartup (void) |
Initial stuff for hospitals Bind some of the functions in this file to console-commands that you can call ingame. Called from UI_InitStartup resp. CL_InitLocal. | |
qboolean | HOS_SaveXML (mxml_node_t *p) |
Saving function for hospital related data. | |
qboolean | HOS_LoadXML (mxml_node_t *p) |
Saving function for hospital related data. | |
qboolean | HOS_HospitalAllowed (const base_t *base) |
Returns true if you can enter in the hospital. |
Most of the hospital related stuff.
Definition in file cp_hospital.c.
#define GET_HP_HEALING | ( | ab | ) | (1 + (ab) * 15/MAX_SKILL) |
Definition at line 33 of file cp_hospital.c.
Referenced by HOS_HealCharacter().
void HOS_HealAll | ( | const base_t *const | base | ) |
Heal all employees in the given base.
[in] | base | The base the employees should become healed |
Definition at line 103 of file cp_hospital.c.
References E_GetNextFromBase(), HOS_HealEmployee(), MAX_EMPL, and type.
qboolean HOS_HealCharacter | ( | character_t * | chr, | |
qboolean | hospital | |||
) |
Heals character.
[in] | chr | Character data of an employee |
[in] | hospital | True if we call this function for hospital healing (false when autoheal). |
Definition at line 42 of file cp_hospital.c.
References ABILITY_POWER, GET_HP_HEALING, character_s::HP, MAX_HP, character_s::maxHP, qfalse, qtrue, character_s::score, and chrScoreGlobal_s::skills.
Referenced by HOS_HealEmployee(), and HOS_HospitalRun().
qboolean HOS_HealEmployee | ( | employee_t * | employee | ) |
Callback for HOS_HealCharacter() in hospital.
[in] | employee | Pointer to the employee to heal. |
Definition at line 92 of file cp_hospital.c.
References employee_s::chr, HOS_HealCharacter(), and qtrue.
Referenced by HOS_HealAll().
Returns true if you can enter in the hospital.
Definition at line 205 of file cp_hospital.c.
References B_GetBuildingStatus(), B_HOSPITAL, BASE_UNDER_ATTACK, base_s::baseStatus, qfalse, and qtrue.
Referenced by B_BaseInit_f(), and B_BuildingOpenAfterClick().
void HOS_HospitalRun | ( | void | ) |
Checks health status of all employees in all bases.
Definition at line 71 of file cp_hospital.c.
References B_GetBuildingStatus(), B_HOSPITAL, employee_s::baseHired, employee_s::chr, E_GetNextHired(), HOS_HealCharacter(), MAX_EMPL, qfalse, qtrue, and type.
Referenced by CL_CampaignRun().
void HOS_InitStartup | ( | void | ) |
Initial stuff for hospitals Bind some of the functions in this file to console-commands that you can call ingame. Called from UI_InitStartup resp. CL_InitLocal.
Definition at line 172 of file cp_hospital.c.
References Cmd_AddCommand().
Referenced by CP_InitStartup().
qboolean HOS_LoadXML | ( | mxml_node_t * | p | ) |
Saving function for hospital related data.
Definition at line 196 of file cp_hospital.c.
References qtrue.
Referenced by SAV_Init().
qboolean HOS_SaveXML | ( | mxml_node_t * | p | ) |
Saving function for hospital related data.
Definition at line 185 of file cp_hospital.c.
References qtrue.
Referenced by SAV_Init().