chr_shared.c File Reference

#include "q_shared.h"
#include "chr_shared.h"
Include dependency graph for chr_shared.c:

Go to the source code of this file.

Functions

qboolean CHRSH_IsTeamDefAlien (const teamDef_t *const td)
 Check if a team definition is alien.
qboolean CHRSH_IsTeamDefRobot (const teamDef_t *const td)
 Check if a team definition is a robot.
void CHRSH_CharGenAbilitySkills (character_t *chr, qboolean multiplayer)
 Generates a skill and ability set for any character.
const char * CHRSH_CharGetBody (const character_t *const chr)
 Returns the body model for the soldiers for armoured and non armoured soldiers.
const char * CHRSH_CharGetHead (const character_t *const chr)
 Returns the head model for the soldiers for armoured and non armoured soldiers.

Detailed Description

Note:
Shared character generating functions prefix: CHRSH_

Definition in file chr_shared.c.


Function Documentation

void CHRSH_CharGenAbilitySkills ( character_t chr,
qboolean  multiplayer 
)

Generates a skill and ability set for any character.

Parameters:
[in] chr Pointer to the character, for which we generate stats.
[in] multiplayer If this is true we use the skill values from soldier_mp mulitplayer is a special case here

Definition at line 54 of file chr_shared.c.

References ABILITY_MIND, teamDef_s::characterTemplates, chrScoreGlobal_s::experience, frand(), GET_MORALE, character_s::HP, i, teamDef_s::id, chrTemplate_s::id, chrScoreGlobal_s::initialSkills, int(), MAX_SKILL, character_s::maxHP, character_s::morale, teamDef_s::numTemplates, teamDef_s::race, RACE_PHALANX_HUMAN, chrTemplate_s::rate, character_s::score, SKILL_NUM_TYPES, chrScoreGlobal_s::skills, chrTemplate_s::skills, Sys_Error(), td, and character_s::teamDef.

Referenced by AI_SetStats(), and CL_GenerateCharacter().

const char* CHRSH_CharGetBody ( const character_t *const   chr  ) 

Returns the body model for the soldiers for armoured and non armoured soldiers.

Parameters:
[in] chr Pointer to character struct
See also:
CHRSH_CharGetBody
Returns:
the character body model (from a static buffer)

Definition at line 135 of file chr_shared.c.

References objDef_s::armourPath, character_s::body, Com_sprintf(), character_s::i, INV_IsArmour, INVSH_HasArmour(), invList_s::item, MAX_VAR, character_s::path, teamDef_s::race, RACE_ROBOT, Sys_Error(), item_s::t, and character_s::teamDef.

Referenced by AI_InitPlayer(), CL_CharacterSkillAndScoreCvars(), CL_UpdateActorAircraftVar(), and G_ClientAssignDefaultActorValues().

const char* CHRSH_CharGetHead ( const character_t *const   chr  ) 

Returns the head model for the soldiers for armoured and non armoured soldiers.

Parameters:
[in] chr Pointer to character struct
See also:
CHRSH_CharGetBody

Definition at line 157 of file chr_shared.c.

References objDef_s::armourPath, Com_sprintf(), character_s::head, character_s::i, INV_IsArmour, INVSH_HasArmour(), invList_s::item, MAX_VAR, character_s::path, teamDef_s::race, RACE_ROBOT, Sys_Error(), item_s::t, and character_s::teamDef.

Referenced by AI_InitPlayer(), CL_CharacterSkillAndScoreCvars(), CL_UpdateActorAircraftVar(), and G_ClientAssignDefaultActorValues().

qboolean CHRSH_IsTeamDefAlien ( const teamDef_t *const   td  ) 
qboolean CHRSH_IsTeamDefRobot ( const teamDef_t *const   td  ) 

Check if a team definition is a robot.

Parameters:
[in] td Pointer to the team definition to check.

Definition at line 43 of file chr_shared.c.

References teamDef_s::race, RACE_BLOODSPIDER, and RACE_ROBOT.

Referenced by AL_AddAliens(), and G_Damage().


Generated by  doxygen 1.6.2