UFO: Alien Invasion
Loading...
Searching...
No Matches
BodyData Class Reference

#include <chr_shared.h>

Collaboration diagram for BodyData:
Collaboration graph

Public Member Functions

 BodyData (void)
const char * id (void) const
const char * id (const short bodyPart) const
const char * name (const short bodyPart) const
float penalty (const short bodyPart, const modifier_types_t type) const
float bleedingFactor (const short bodyPart) const
float woundThreshold (const short bodyPart) const
short getRandomBodyPart (void) const
short numBodyParts (void) const
void setId (const char *id)
void addBodyPart (const BodyPartData &bodyPart)
short getHitBodyPart (const byte direction, const float height) const
float getArea (const short bodyPart) const

Private Attributes

char _id [MAX_TEXPATH]
BodyPartData _bodyParts [BODYPART_MAXTYPE]
float _totalBodyArea
short _numBodyParts

Detailed Description

Definition at line 278 of file chr_shared.h.

Constructor & Destructor Documentation

◆ BodyData()

BodyData::BodyData ( void )

Definition at line 336 of file chr_shared.cpp.

References _numBodyParts, and _totalBodyArea.

Member Function Documentation

◆ addBodyPart()

void BodyData::addBodyPart ( const BodyPartData & bodyPart)

Definition at line 399 of file chr_shared.cpp.

References _bodyParts, _numBodyParts, _totalBodyArea, and getArea().

Referenced by Com_ParseBodyPart().

◆ bleedingFactor()

float BodyData::bleedingFactor ( const short bodyPart) const

Definition at line 379 of file chr_shared.cpp.

References _bodyParts.

Referenced by CL_ActorWound(), G_BleedWounds(), G_TreatActor(), and HUD_ActorWoundData_f().

◆ getArea()

float BodyData::getArea ( const short bodyPart) const

Definition at line 427 of file chr_shared.cpp.

References _bodyParts.

Referenced by addBodyPart(), G_DamageActor(), and getRandomBodyPart().

◆ getHitBodyPart()

short BodyData::getHitBodyPart ( const byte direction,
const float height ) const

Definition at line 405 of file chr_shared.cpp.

References _bodyParts, _numBodyParts, Com_DPrintf(), DEBUG_SHARED, frand(), name, and Vector4Copy.

Referenced by G_DamageActor().

◆ getRandomBodyPart()

short BodyData::getRandomBodyPart ( void ) const

Definition at line 341 of file chr_shared.cpp.

References _numBodyParts, _totalBodyArea, Com_DPrintf(), DEBUG_SHARED, frand(), getArea(), and name.

Referenced by AI_SetStats(), and AM_CheckFire().

◆ id() [1/2]

const char * BodyData::id ( const short bodyPart) const

Definition at line 364 of file chr_shared.cpp.

References _bodyParts.

◆ id() [2/2]

const char * BodyData::id ( void ) const

◆ name()

const char * BodyData::name ( const short bodyPart) const

Definition at line 369 of file chr_shared.cpp.

References _bodyParts.

Referenced by HOS_EntryWoundData(), and HUD_ActorWoundData_f().

◆ numBodyParts()

◆ penalty()

float BodyData::penalty ( const short bodyPart,
const modifier_types_t type ) const

Definition at line 374 of file chr_shared.cpp.

References _bodyParts, and type.

Referenced by CL_ActorInjuryModifier(), G_ActorGetInjuryPenalty(), and HUD_ActorWoundData_f().

◆ setId()

void BodyData::setId ( const char * id)

Definition at line 394 of file chr_shared.cpp.

References _id, and Q_strncpyz().

Referenced by Com_ParseBodyTemplate().

◆ woundThreshold()

float BodyData::woundThreshold ( const short bodyPart) const

Field Documentation

◆ _bodyParts

BodyPartData BodyData::_bodyParts[BODYPART_MAXTYPE]
private

◆ _id

char BodyData::_id[MAX_TEXPATH]
private

Definition at line 280 of file chr_shared.h.

Referenced by id(), and setId().

◆ _numBodyParts

short BodyData::_numBodyParts
private

Definition at line 283 of file chr_shared.h.

Referenced by addBodyPart(), BodyData(), getHitBodyPart(), getRandomBodyPart(), and numBodyParts().

◆ _totalBodyArea

float BodyData::_totalBodyArea
private

Definition at line 282 of file chr_shared.h.

Referenced by addBodyPart(), BodyData(), and getRandomBodyPart().


The documentation for this class was generated from the following files: