UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Actor Class Reference

An Edict of type Actor. More...

#include <g_edict.h>

Inherits Edict.

Public Member Functions

int getMorale () const
 
bool isState (int flag) const
 
bool isShaken () const
 
bool isStunned () const
 
bool isPanicked () const
 
bool isReaction () const
 
bool isRaged () const
 
bool isInsane () const
 
bool isDazed () const
 
bool isCrouched () const
 
bool isDead () const
 
void setState (int flag)
 
void setShaken ()
 
void setStunned ()
 
void setPanicked ()
 
void setReaction ()
 
void setRaged ()
 
void setInsane ()
 
void setDazed ()
 
void setCrouched ()
 
void unsetState (int flag)
 
void removeShaken ()
 
void removeStunned ()
 
void removePanicked ()
 
void removeReaction ()
 
void removeRaged ()
 
void removeInsane ()
 
void removeDazed ()
 
void removeCrouched ()
 
unsigned int getBody () const
 
void setBody (unsigned int body_)
 
unsigned int getHead () const
 
void setHead (unsigned int head_)
 
int getUsableTUs () const
 Calculates the amount of usable TUs. This is without the reserved TUs. More...
 
bool isInRescueZone () const
 Checks whether the given actor is currently standing in a rescue zone. More...
 
void setInRescueZone (bool inRescueZone_)
 Set the rescue zone flag. More...
 
- Public Member Functions inherited from Edict
void init (int idx)
 
void setPlayerNum (int num)
 
void setTeam (int team_)
 
void setChild (Edict *child)
 
void nativeReset ()
 
void setActive ()
 
void toggleActive ()
 
void resetContainer (const containerIndex_t idx)
 
void setFloor (const Edict *other)
 
void resetFloor ()
 
void calcOrigin ()
 Calculate the edict's origin vector from it's grid position. More...
 
void setOrigin (const pos3_t newPos)
 Set the edict's pos and origin vector to the given grid position. More...
 
int getIdNum () const
 
int getPlayerNum () const
 
Edictchild ()
 
Edictowner ()
 
ItemgetContainer (const containerIndex_t idx) const
 
ItemgetArmour () const
 
ItemgetRightHandItem () const
 
ItemgetLeftHandItem () const
 
ItemgetHandItem (actorHands_t hand) const
 
ItemgetFloor () const
 
Player & getPlayer () const
 
int getTeam () const
 
bool isSameAs (const Edict *other) const
 
bool isSameTeamAs (const Edict *other) const
 
bool isSamePosAs (const pos3_t cmpPos)
 Check whether the edict is on the given position. More...
 
bool isOpponent (const Actor *actor) const
 Check if given actor is an enemy. More...
 
void setStun (int stu)
 
void addStun (int stu)
 
int getStun () const
 
void setMorale (int mor)
 
void setTus (int tus)
 
int getTus () const
 
void setTouch (bool(*touch_)(Edict *self, Edict *activator))
 
bool hasTouch () const
 
bool callTouch (Edict *activator)
 
int getReservedTUs () const
 Calculates the amount of all currently reserved TUs. More...
 

Additional Inherited Members

- Data Fields inherited from Edict
bool inuse
 
int linkcount
 
int number
 
vec3_t origin
 
vec3_t angles
 
pos3_t pos
 
solid_t solid
 
AABB entBox
 
AABB absBox
 
vec3_t size
 
Edict_child
 
Edict_owner
 
int modelindex
 
const char * classname
 
int mapNum
 
const char * model
 
EdictparticleLink
 
const Edictlink
 
entity_type_t type
 
teammask_t visflags
 
int contentFlags
 
byte dir
 
int TU
 
int HP
 
int _STUN
 
int morale
 
int state
 
int frame
 
char * group
 
EdictclientAction
 
character_t chr
 
int spawnflags
 
float angle
 
int radius
 
int speed
 
const char * target
 
const char * targetname
 
const char * item
 
const char * particle
 
const char * nextmap
 
const char * message
 
const char * description
 
const char * noise
 
edictMaterial_t material
 
camera_edict_data_t camera
 
int count
 
int time
 
int sounds
 
int dmg
 
byte dmgtype
 
actorSizeEnum_t fieldSize
 
bool hiding
 
bool(* _touch )(Edict *self, Edict *activator)
 
void(* reset )(Edict *self, Edict *activator)
 
float nextthink
 
void(* think )(Edict *self)
 
bool(* use )(Edict *self, Edict *activator)
 
bool(* destroy )(Edict *self)
 
linkedList_ttouchedList
 
int doorState
 
moveinfo_t moveinfo
 
EdictgroupChain
 
EdictgroupMaster
 
int flags
 
AI_t AI
 
pos3_tforbiddenListPos
 
int forbiddenListSize
 
bool active
 
- Protected Attributes inherited from Edict
int team
 
int pnum
 
unsigned int body
 
unsigned int head
 
bool inRescueZone
 

Detailed Description

An Edict of type Actor.

Note
Let's try to split the 'god-class' Edict into smaller chunks. Class Actor is intended to receive members and functions from Edict that are only used with actors. There will be other classes (eg. Trigger, Field, Item,...) in the future.

Definition at line 348 of file g_edict.h.

Member Function Documentation

unsigned int Actor::getBody ( ) const
inline

Definition at line 384 of file g_edict.h.

References Edict::body.

Referenced by G_EventActorAppear().

unsigned int Actor::getHead ( ) const
inline

Definition at line 390 of file g_edict.h.

References Edict::head.

Referenced by G_EventActorAppear().

int Actor::getMorale ( ) const
inline

Definition at line 350 of file g_edict.h.

References Edict::morale.

Referenced by actorL_morale().

int Actor::getUsableTUs ( ) const
inline
bool Actor::isDazed ( ) const
inline

Definition at line 360 of file g_edict.h.

References STATE_DAZED.

Referenced by ReactionFire::canReact(), and G_ActorGiveTimeUnits().

bool Actor::isInRescueZone ( ) const
inline

Checks whether the given actor is currently standing in a rescue zone.

Returns
true if the actor is standing in a rescue zone, false otherwise.

Definition at line 407 of file g_edict.h.

References Edict::inRescueZone.

Referenced by G_MatchSendResults().

bool Actor::isPanicked ( ) const
inline
bool Actor::isRaged ( ) const
inline
bool Actor::isReaction ( ) const
inline
bool Actor::isShaken ( ) const
inline

Definition at line 354 of file g_edict.h.

References STATE_SHAKEN.

Referenced by G_ClientStateChange(), ReactionFire::isEnemy(), and ReactionFire::shoot().

bool Actor::isState ( int  flag) const
inline

Definition at line 353 of file g_edict.h.

Referenced by Edict::isOpponent().

void Actor::removeCrouched ( )
inline

Definition at line 382 of file g_edict.h.

References STATE_CROUCHED.

Referenced by G_MoralePanic().

void Actor::removeDazed ( )
inline

Definition at line 381 of file g_edict.h.

References STATE_DAZED.

Referenced by G_ActorGiveTimeUnits().

void Actor::removeInsane ( )
inline

Definition at line 380 of file g_edict.h.

References STATE_INSANE.

Referenced by G_MoraleStopPanic(), and G_MoraleStopRage().

void Actor::removePanicked ( )
inline

Definition at line 377 of file g_edict.h.

References STATE_PANIC.

Referenced by G_MoraleStopPanic().

void Actor::removeRaged ( )
inline

Definition at line 379 of file g_edict.h.

References STATE_RAGE.

Referenced by G_MoraleStopRage().

void Actor::removeReaction ( )
inline

Definition at line 378 of file g_edict.h.

References STATE_REACTION.

Referenced by ReactionFire::canReact(), G_ClientStateChange(), and G_Damage().

void Actor::removeShaken ( )
inline

Definition at line 375 of file g_edict.h.

References STATE_SHAKEN.

Referenced by G_ReactionFireReset(), and ReactionFire::tryToShoot().

void Actor::removeStunned ( )
inline

Definition at line 376 of file g_edict.h.

References STATE_STUN.

Referenced by G_ActorDie(), and G_ActorRevitalise().

void Actor::setBody ( unsigned int  body_)
inline

Definition at line 387 of file g_edict.h.

Referenced by AI_InitPlayer(), and G_ClientAssignDefaultActorValues().

void Actor::setCrouched ( )
inline

Definition at line 372 of file g_edict.h.

References STATE_CROUCHED.

void Actor::setDazed ( )
inline

Definition at line 371 of file g_edict.h.

References STATE_DAZED.

Referenced by G_Damage().

void Actor::setHead ( unsigned int  head_)
inline

Definition at line 393 of file g_edict.h.

Referenced by AI_InitPlayer(), and G_ClientAssignDefaultActorValues().

void Actor::setInRescueZone ( bool  inRescueZone_)
inline

Set the rescue zone flag.

Parameters
[in]inRescueZone_true if the actor is in the rescue zone, false otherwise

Definition at line 414 of file g_edict.h.

Referenced by Reset_RescueTrigger(), and Touch_RescueTrigger().

void Actor::setInsane ( )
inline

Definition at line 370 of file g_edict.h.

References STATE_INSANE.

Referenced by G_MoraleBehaviour().

void Actor::setPanicked ( )
inline

Definition at line 367 of file g_edict.h.

References STATE_PANIC.

Referenced by G_MoralePanic().

void Actor::setRaged ( )
inline

Definition at line 369 of file g_edict.h.

References STATE_RAGE.

Referenced by G_MoraleRage().

void Actor::setReaction ( )
inline

Definition at line 368 of file g_edict.h.

References STATE_REACTION.

void Actor::setShaken ( )
inline

Definition at line 365 of file g_edict.h.

References STATE_SHAKEN.

Referenced by G_MoraleBehaviour().

void Actor::setState ( int  flag)
inline

Definition at line 364 of file g_edict.h.

void Actor::setStunned ( )
inline

Definition at line 366 of file g_edict.h.

References STATE_STUN.

void Actor::unsetState ( int  flag)
inline

Definition at line 374 of file g_edict.h.


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