21#include <vrfmodel/humanDamageActuator.h>
50 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
62 virtual const char*
type()
const override;
70 virtual bool init()
override;
78 virtual void tick()
override;
108 static DtSimComponent*
creator(
const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
109 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
172 std::string bodyZoneName;
173 DtVector bodyZoneCenter;
178 std::string surfaceName;
179 int overallHealthLoss;
180 int overallHealthLossModifier;
181 int mobilityHealthLoss;
182 int mobilityHealthLossModifier;
183 int firepowerHealthLoss;
184 int firepowerHealthLossModifier;
DtVreHumanDamageActuator(const DtVreHumanDamageActuator &other)
Copy constructor (not implemented)
std::map< DtLifeformState, DtDamageMap > myPostureDamageMap
Map of damage maps for different postures.
Definition vreHumanDamageActuator.h:197
DtRwInt * myFirepowerHealth
Entity's firepower health value.
Definition vreHumanDamageActuator.h:215
virtual bool init() override
Initializes the human damage actuator.
virtual void setRestored() override
Restores an entity to a functional state.
std::map< std::string, DtDamageZoneInfo > DtDamageMap
Damage map for body parts indexed by body zone name.
Definition vreHumanDamageActuator.h:191
DtVreHumanDamageActuator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Constructor.
DtVreHumanDamageActuator & operator=(const DtVreHumanDamageActuator &other)
Assignment operator (not implemented)
bool myOpeOk
Flag indicating if OPE access is valid.
Definition vreHumanDamageActuator.h:221
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Factory method to create a new instance of this component.
virtual ~DtVreHumanDamageActuator() override
Virtual destructor.
virtual const char * type() const override
Gets the type identifier for this component.
virtual void tick() override
Updates the actuator state each simulation frame.
DtRwInt * myOverallHealth
Entity's overall health value.
Definition vreHumanDamageActuator.h:203
void initPostureDamageMaps()
Initializes the posture-specific damage maps.
virtual void setDestroyed() override
Sets the entity to a destroyed state.
void sendSetPosture(DtLifeformState post)
Changes the entity's posture.
virtual void updateState(DtDamageState state) override
Updates the damage state of the entity.
DtRwInt * myMobilityHealth
Entity's mobility health value.
Definition vreHumanDamageActuator.h:209
virtual bool adjudicateCollateralDamage(const DtDetonationContext &detonationContext) override
Processes collateral damage from a nearby detonation.
virtual bool adjudicateDirectDamage(const DtDetonationContext &detonationContext) override
Processes direct damage from a detonation.
struct DtDamageZoneInfo { std::string bodyZoneName; DtVector bodyZoneCenter; bool useSurfaceData; std::string surfaceName; int overallHealthLoss; int overallHealthLossModifier; int mobilityHealthLoss; int mobilityHealthLossModifier; int firepowerHealthLoss; int firepowerHealthLossModifier; } DtDamageZoneInfo
Information about a body zone and its damage characteristics.
Definition vreHumanDamageActuator.h:170
DtVreSimComponent(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Definition vreSimComponent.h:54
Defines export macros for the vreVrfmodel library.
#define VREVRFMODEL_DLL
Definition export.h:22
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
const char DtVreHumanDamageActuatorType[]
Type identifier for the VRE human damage actuator component.
Definition vreHumanDamageActuator.h:28
Base template class for VR-Engage simulation components.