Planeshift
GEMClientActor Class Reference

This is a player or another 'alive' entity on the client. More...

#include <pscelclient.h>

Classes

struct  PostLoadData
 Post load data. More...
 

Public Member Functions

psCharAppearanceCharAppearance ()
 
virtual bool CheckLoadStatus ()
 Delayed mesh loading. More...
 
void CopyNewestData (GEMClientActor &oldActor)
 When receiving a psPersistActor message for the actor we currently control, some of our data (notably DRcounter) is probably newer than that sent by the server. More...
 
 GEMClientActor (psCelClient *cel, psPersistActor &mesg)
 
int GetAnimIndex (csStringHashReversible *msgstrings, csStringID animid)
 This optimal routine tries to get the animation index given an animation csStringID. More...
 
unsigned GetChatBubbleID () const
 
unsigned int GetGroupID ()
 
const char * GetGuildName ()
 
void GetLastPosition (csVector3 &pos, float &yrot, iSector *&sector)
 Get the last position of this object. More...
 
virtual int GetMasqueradeType ()
 
uint8_t GetMode ()
 
virtual const char * GetName (bool realName=true)
 
virtual GEMOBJECT_TYPE GetObjectType ()
 
EID GetOwnerEID ()
 
iSector * GetSector () const
 Get sector of entity. More...
 
const csVector3 GetVelocity () const
 Get the object velocity. More...
 
psClientVitalsGetVitalMgr ()
 Get the condition manager on this actor. More...
 
float GetYRotation () const
 
virtual bool IsAlive ()
 Indicate if this object is alive. More...
 
bool IsGroupedWith (GEMClientActor *actor)
 
bool IsOwnedBy (GEMClientActor *actor)
 
psLinearMovementMovement ()
 Get the movment system this object is using. More...
 
bool NeedDRUpdate (unsigned char &priority)
 
csVector3 Pos () const
 
void RefreshCal3d ()
 Reloads iSpriteCal3DState. More...
 
csVector3 Rot () const
 
void SendDRUpdate (unsigned char priority, csStringHashReversible *msgstrings)
 
void SetAlive (bool aliveFlag, bool newactor)
 
bool SetAnimation (const char *anim, int duration=0)
 
void SetAnimationVelocity (const csVector3 &velocity)
 
void SetChatBubbleID (unsigned int chatBubbleID)
 
void SetDRData (psDRMessage &drmsg)
 
void SetGroupID (unsigned int id)
 
void SetGuildName (const char *guild)
 
void SetIdleAnimation (const char *anim)
 
void SetMode (uint8_t mode, bool newactor=false)
 
void SetOwnerEID (EID id)
 
virtual void SetPosition (const csVector3 &pos, float rot, iSector *sector)
 
void SetVelocity (const csVector3 &vel)
 Set the velocity of the actor. More...
 
void SetYRotation (const float yrot)
 Set the rotation of the actor. More...
 
void StopMoving (bool worldVel=false)
 
virtual void Update ()
 
virtual ~GEMClientActor ()
 
- Public Member Functions inherited from GEMClientObject
virtual void ChangeName (const char *name)
 
int Flags ()
 Get the flag bit field. More...
 
 GEMClientObject ()
 
 GEMClientObject (psCelClient *cel, EID id)
 
virtual const csBox3 & GetBBox () const
 Return the bounding box of this entity. More...
 
EID GetEID ()
 
psEffectGetEntityLabel ()
 
const char * GetFactName ()
 
iMeshWrapper * GetMesh () const
 Get the mesh that this object has. More...
 
virtual const char * GetName ()
 
virtual csVector3 GetPosition ()
 Get position of entity. More...
 
virtual float GetRotation ()
 Get rotation of entity as returned by psWorld::Matrix2YRot. More...
 
virtual iSectorList * GetSectors () const
 Get list of sectors that entity is in. More...
 
psEffectGetShadow ()
 
int GetType ()
 
bool HasLabel () const
 
bool HasShadow () const
 
void LoadMesh ()
 Start loading the mesh. More...
 
void Move (const csVector3 &pos, const csVector3 &rotangle, const char *room)
 Set the position of mesh. More...
 
virtual void PostLoad (bool)
 Delayed load 'post-process'. More...
 
float RangeTo (GEMClientObject *obj, bool ignoreY)
 
void Rotate (float xRot, float yRot, float zRot)
 Set the rotation of mesh. More...
 
void SetEntityLabel (psEffect *el)
 
virtual void SetPosition (const csVector3 &pos, const csVector3 &rot, iSector *sector)
 Set position of entity. More...
 
void SetShadow (psEffect *shadow)
 
void SubstituteRacialMeshFact ()
 Performs helm group substitutions. More...
 
virtual ~GEMClientObject ()
 
- Public Member Functions inherited from DelayedLoader
virtual ~DelayedLoader ()
 

Public Attributes

csHash< int, csStringID > anim_hash
 
csRef< CS::Mesh::iAnimatedMesh > animeshObject
 
float baseScale
 
csString BeltGroup
 
csString BracerGroup
 
csRef< iSpriteCal3DState > cal3dstate
 
csString CloakGroup
 
csString equipment
 
unsigned short gender
 
csString helmGroup
 
csTicks lastDRUpdateTime
 
csVector3 lastSentRotation
 
csVector3 lastSentVelocity
 
psLinearMovementlinmove
 
csString MounterAnim
 
csString mountFactname
 
float mountScale
 
csString partName
 
bool path_sent
 
csString race
 
float scale
 
csRef< CS::Animation::iSkeletonSpeedNode > speedNode
 
bool stationary
 
csPDelArray< TraittraitList
 
csString traits
 
psClientVitalsvitalManager
 The Vital of the player with regards to his health/mana/fatigue/etc. More...
 
- Public Attributes inherited from GEMClientObject
csRef< iMeshWrapper > pcmesh
 

Protected Member Functions

void InitCharData (const char *textures, const char *equipment)
 
void SetCharacterMode (size_t id)
 
virtual void SwitchToRealMesh (iMeshWrapper *mesh)
 

Protected Attributes

bool alive
 
psCharAppearancecharApp
 
unsigned int chatBubbleID
 
uint8_t DRcounter
 increments in loop to prevent out of order packet overwrites of better data More...
 
bool DRcounter_set
 
csRef< iThreadReturn > factory
 
unsigned int groupID
 
csString guildName
 
int masqueradeType
 
csRef< iThreadReturn > mountFactory
 
size_t movementMode
 
EID ownerEID
 
PostLoadDatapost_load
 
csRef< iMeshWrapper > rider
 
uint8_t serverMode
 
- Protected Attributes inherited from GEMClientObject
EID eid
 
psEffectentitylabel
 
csString factName
 
int flags
 Various flags on the entity. More...
 
bool hasLabel
 
bool hasShadow
 
csRef< InstanceObjectinstance
 
csString matName
 
csString name
 
csRef< csShaderVariable > position
 
psEffectshadow
 
int type
 

Additional Inherited Members

- Static Public Member Functions inherited from GEMClientObject
static void UnsetCelClient ()
 
- Static Protected Attributes inherited from GEMClientObject
static psCelClientcel
 

Detailed Description

This is a player or another 'alive' entity on the client.

Definition at line 554 of file pscelclient.h.

Constructor & Destructor Documentation

GEMClientActor::GEMClientActor ( psCelClient cel,
psPersistActor mesg 
)
virtual GEMClientActor::~GEMClientActor ( )
virtual

Member Function Documentation

psCharAppearance* GEMClientActor::CharAppearance ( )
inline

Definition at line 638 of file pscelclient.h.

virtual bool GEMClientActor::CheckLoadStatus ( )
virtual

Delayed mesh loading.

Reimplemented from GEMClientObject.

void GEMClientActor::CopyNewestData ( GEMClientActor oldActor)

When receiving a psPersistActor message for the actor we currently control, some of our data (notably DRcounter) is probably newer than that sent by the server.

This function copies such data from our old actor into the replacement we just created.

Parameters
oldActorThe actor to copy data from.
int GEMClientActor::GetAnimIndex ( csStringHashReversible *  msgstrings,
csStringID  animid 
)

This optimal routine tries to get the animation index given an animation csStringID.

unsigned GEMClientActor::GetChatBubbleID ( ) const
unsigned int GEMClientActor::GetGroupID ( )
inline

Definition at line 700 of file pscelclient.h.

const char* GEMClientActor::GetGuildName ( )
inline

Definition at line 624 of file pscelclient.h.

void GEMClientActor::GetLastPosition ( csVector3 &  pos,
float yrot,
iSector *&  sector 
)

Get the last position of this object.

Parameters
posThe x,y,z location of the object. [CHANGED]
yrotThe Y-Axis rotation of the object. [CHANGED]
sectorThe sector of the object is in [CHANGED]
virtual int GEMClientActor::GetMasqueradeType ( )
inlinevirtual

Reimplemented from GEMClientObject.

Definition at line 606 of file pscelclient.h.

uint8_t GEMClientActor::GetMode ( )
inline

Definition at line 649 of file pscelclient.h.

virtual const char* GEMClientActor::GetName ( bool  realName = true)
virtual
virtual GEMOBJECT_TYPE GEMClientActor::GetObjectType ( )
inlinevirtual

Reimplemented from GEMClientObject.

Definition at line 561 of file pscelclient.h.

EID GEMClientActor::GetOwnerEID ( )
inline

Definition at line 708 of file pscelclient.h.

iSector* GEMClientActor::GetSector ( ) const
virtual

Get sector of entity.

Reimplemented from GEMClientObject.

const csVector3 GEMClientActor::GetVelocity ( ) const

Get the object velocity.

Returns
The velocity of the object as a vector.
psClientVitals* GEMClientActor::GetVitalMgr ( )
inline

Get the condition manager on this actor.

Definition at line 613 of file pscelclient.h.

float GEMClientActor::GetYRotation ( ) const
void GEMClientActor::InitCharData ( const char *  textures,
const char *  equipment 
)
protected
virtual bool GEMClientActor::IsAlive ( )
inlinevirtual

Indicate if this object is alive.

Reimplemented from GEMClientObject.

Definition at line 602 of file pscelclient.h.

bool GEMClientActor::IsGroupedWith ( GEMClientActor actor)
bool GEMClientActor::IsOwnedBy ( GEMClientActor actor)
psLinearMovement& GEMClientActor::Movement ( )

Get the movment system this object is using.

bool GEMClientActor::NeedDRUpdate ( unsigned char &  priority)
csVector3 GEMClientActor::Pos ( ) const
void GEMClientActor::RefreshCal3d ( )

Reloads iSpriteCal3DState.

csVector3 GEMClientActor::Rot ( ) const
void GEMClientActor::SendDRUpdate ( unsigned char  priority,
csStringHashReversible *  msgstrings 
)
void GEMClientActor::SetAlive ( bool  aliveFlag,
bool  newactor 
)
bool GEMClientActor::SetAnimation ( const char *  anim,
int  duration = 0 
)
void GEMClientActor::SetAnimationVelocity ( const csVector3 &  velocity)
void GEMClientActor::SetCharacterMode ( size_t  id)
protected
void GEMClientActor::SetChatBubbleID ( unsigned int  chatBubbleID)
void GEMClientActor::SetDRData ( psDRMessage drmsg)
void GEMClientActor::SetGroupID ( unsigned int  id)
inline

Definition at line 704 of file pscelclient.h.

void GEMClientActor::SetGuildName ( const char *  guild)
inline

Definition at line 628 of file pscelclient.h.

void GEMClientActor::SetIdleAnimation ( const char *  anim)
void GEMClientActor::SetMode ( uint8_t  mode,
bool  newactor = false 
)
void GEMClientActor::SetOwnerEID ( EID  id)
inline

Definition at line 712 of file pscelclient.h.

virtual void GEMClientActor::SetPosition ( const csVector3 &  pos,
float  rot,
iSector *  sector 
)
virtual
void GEMClientActor::SetVelocity ( const csVector3 &  vel)

Set the velocity of the actor.

void GEMClientActor::SetYRotation ( const float  yrot)

Set the rotation of the actor.

void GEMClientActor::StopMoving ( bool  worldVel = false)
virtual void GEMClientActor::SwitchToRealMesh ( iMeshWrapper *  mesh)
protectedvirtual
virtual void GEMClientActor::Update ( )
virtual

Reimplemented from GEMClientObject.

Member Data Documentation

bool GEMClientActor::alive
protected

Definition at line 744 of file pscelclient.h.

csHash<int,csStringID> GEMClientActor::anim_hash

Definition at line 672 of file pscelclient.h.

csRef<CS::Mesh::iAnimatedMesh> GEMClientActor::animeshObject

Definition at line 662 of file pscelclient.h.

float GEMClientActor::baseScale

Definition at line 694 of file pscelclient.h.

csString GEMClientActor::BeltGroup

Definition at line 685 of file pscelclient.h.

csString GEMClientActor::BracerGroup

Definition at line 684 of file pscelclient.h.

csRef<iSpriteCal3DState> GEMClientActor::cal3dstate

Definition at line 661 of file pscelclient.h.

psCharAppearance* GEMClientActor::charApp
protected

Definition at line 731 of file pscelclient.h.

unsigned int GEMClientActor::chatBubbleID
protected

Definition at line 733 of file pscelclient.h.

csString GEMClientActor::CloakGroup

Definition at line 686 of file pscelclient.h.

uint8_t GEMClientActor::DRcounter
protected

increments in loop to prevent out of order packet overwrites of better data

Definition at line 737 of file pscelclient.h.

bool GEMClientActor::DRcounter_set
protected

Definition at line 738 of file pscelclient.h.

csString GEMClientActor::equipment

Definition at line 687 of file pscelclient.h.

csRef<iThreadReturn> GEMClientActor::factory
protected

Definition at line 727 of file pscelclient.h.

unsigned short GEMClientActor::gender

Definition at line 692 of file pscelclient.h.

unsigned int GEMClientActor::groupID
protected

Definition at line 734 of file pscelclient.h.

csString GEMClientActor::guildName
protected

Definition at line 736 of file pscelclient.h.

csString GEMClientActor::helmGroup

Definition at line 683 of file pscelclient.h.

csTicks GEMClientActor::lastDRUpdateTime

Definition at line 691 of file pscelclient.h.

csVector3 GEMClientActor::lastSentRotation

Definition at line 689 of file pscelclient.h.

csVector3 GEMClientActor::lastSentVelocity

Definition at line 689 of file pscelclient.h.

psLinearMovement* GEMClientActor::linmove

Definition at line 643 of file pscelclient.h.

int GEMClientActor::masqueradeType
protected

Definition at line 746 of file pscelclient.h.

csString GEMClientActor::MounterAnim

Definition at line 682 of file pscelclient.h.

csString GEMClientActor::mountFactname

Definition at line 681 of file pscelclient.h.

csRef<iThreadReturn> GEMClientActor::mountFactory
protected

Definition at line 728 of file pscelclient.h.

float GEMClientActor::mountScale

Definition at line 695 of file pscelclient.h.

size_t GEMClientActor::movementMode
protected

Definition at line 749 of file pscelclient.h.

EID GEMClientActor::ownerEID
protected

Definition at line 735 of file pscelclient.h.

csString GEMClientActor::partName

Definition at line 680 of file pscelclient.h.

bool GEMClientActor::path_sent

Definition at line 690 of file pscelclient.h.

PostLoadData* GEMClientActor::post_load
protected

Definition at line 766 of file pscelclient.h.

csString GEMClientActor::race

Definition at line 679 of file pscelclient.h.

csRef<iMeshWrapper> GEMClientActor::rider
protected

Definition at line 729 of file pscelclient.h.

float GEMClientActor::scale

Definition at line 693 of file pscelclient.h.

uint8_t GEMClientActor::serverMode
protected

Definition at line 750 of file pscelclient.h.

csRef<CS::Animation::iSkeletonSpeedNode> GEMClientActor::speedNode

Definition at line 663 of file pscelclient.h.

bool GEMClientActor::stationary

Definition at line 690 of file pscelclient.h.

csPDelArray<Trait> GEMClientActor::traitList

Definition at line 717 of file pscelclient.h.

csString GEMClientActor::traits

Definition at line 688 of file pscelclient.h.

psClientVitals* GEMClientActor::vitalManager

The Vital of the player with regards to his health/mana/fatigue/etc.

Definition at line 646 of file pscelclient.h.


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