cp_hospital.h File Reference

Header file for hospital related stuff. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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_HealCharacter (character_t *chr, qboolean hospital)
 Heals character.
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_HospitalRun (void)
 Checks health status of all employees in all bases.

Detailed Description

Header file for hospital related stuff.

Definition in file cp_hospital.h.


Function Documentation

void HOS_HealAll ( const base_t *const   base  ) 

Heal all employees in the given base.

Parameters:
[in] base The base the employees should become healed
See also:
HOS_HealEmployee

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.

Parameters:
[in] chr Character data of an employee
[in] hospital True if we call this function for hospital healing (false when autoheal).
See also:
HOS_HealEmployee
Returns:
true if soldiers becomes healed - false otherwise

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.

Parameters:
[in] employee Pointer to the employee to heal.
See also:
HOS_HealCharacter
HOS_HealAll

Definition at line 92 of file cp_hospital.c.

References employee_s::chr, HOS_HealCharacter(), and qtrue.

Referenced by HOS_HealAll().

void HOS_HospitalRun ( void   ) 

Checks health status of all employees in all bases.

See also:
CL_CampaignRun
Note:
Called every day.

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().


Generated by  doxygen 1.6.2