19 #ifndef __psCelClient_H__    20 #define __psCelClient_H__    24 #include <csutil/cscolor.h>    25 #include <csutil/parray.h>    26 #include <csutil/refarr.h>    27 #include <csutil/list.h>    28 #include <csutil/hash.h>    29 #include <csutil/redblacktree.h>    30 #include <csutil/strhashr.h>    31 #include <iengine/collection.h>    32 #include <iengine/sector.h>    33 #include <imesh/animesh.h>    34 #include <imesh/animnode/skeleton2anim.h>    35 #include <imesh/animnode/speed.h>    51 struct iSpriteCal3DState;
   111     iObjectRegistry* object_reg;
   112     csPDelArray<GEMClientObject> entities;
   113     csHash<GEMClientObject*, EID> entities_hash;
   114     csRefArray<MsgEntry> newActorQueue;
   115     csRefArray<MsgEntry> newItemQueue;
   116     bool instantiateItems;
   119     csArray<GEMClientActionLocation*> actions;
   124         csVector3 effectoffset;
   131         csVector3 lightoffset;
   138         csPDelArray<Effect> effects;
   139         csPDelArray<Light> lights;
   142     csHash<ItemEffect*, csString> effectItems;
   145     void LoadEffectItems();
   147     csRedBlackTreeMap<csString, csRef<InstanceObject>,csFixedSizeAllocator<
sizeof(CS::Container::RedBlackTreeNode<
   148             csRedBlackTreePayload<csString,csRef<InstanceObject> > >)>, CS::Container::RedBlackTreeOrderingStrictWeak > instanceObjects;
   150     csRedBlackTreeMap<csString, csRef<iMeshFactoryWrapper>,csFixedSizeAllocator<
sizeof(CS::Container::RedBlackTreeNode<
   151             csRedBlackTreePayload<csString,csRef<iMeshFactoryWrapper> > >)>, CS::Container::RedBlackTreeOrderingStrictWeak > nullFactories;
   160     void RequestServerWorld();
   167     void SetPlayerReady(
bool flag);
   179     bool IsMeshSubjectToAction(
const char* 
sector,
const char* mesh);
   180     GEMClientActor* GetActorByName(
const char* name, 
bool trueName = 
true) 
const;
   182     virtual void HandleMessage(
MsgEntry* me);
   184     void SetupWorldColliders();
   192         return shadowManager;
   211     void HandleItemEffect(
const char* factName, iMeshWrapper* mw, 
bool onGround = 
true, 
const char* slot = 0,
   212                           csHash<int, csString>* effectids = 0, csHash<int, csString>* lightids = 0);
   220     void OnRegionsDeleted(csArray<iCollection*> ®ions);
   231     void HandleUnresolvedPos(
GEMClientObject* entity, 
const csVector3 &
pos, 
const csVector3 &
rot, 
const csString §or);
   233     void PruneEntities();
   237         return unresSector == 
sector;
   246         return requeststatus;
   250     void CheckEntityQueues();
   252     void ForceEntityQueues();
   254     void Update(
bool loaded);
   290     csArray<GEMClientObject*> FindNearbyEntities(iSector* sector, 
const csVector3 &pos, 
float radius, 
bool doInvisible = 
false);
   295     csPtr<InstanceObject> FindInstanceObject(
const char* name) 
const;
   300     void AddInstanceObject(
const char* name, csRef<InstanceObject> 
object);
   305     void RemoveInstanceObject(
const char* name);
   307     csPtr<iMeshFactoryWrapper> FindNullFactory(
const char* name) 
const;
   308     void AddNullFactory(
const char* name, csRef<iMeshFactoryWrapper> 
object);
   309     void RemoveNullFactory(
const char* name);
   315     void replaceRacialGroup(csString &
string);
   319         return instantiateItems;
   324     csList<UnresolvedPos*>::Iterator FindUnresolvedPos(
GEMClientObject* entity);
   339     void HandleActionLocation(
MsgEntry* me);
   340     void HandleObjectRemoval(
MsgEntry* me);
   341     void HandleNameChange(
MsgEntry* me);
   342     void HandleGuildChange(
MsgEntry* me);
   343     void HandleGroupChange(
MsgEntry* me);
   345     void HandleMecsActivate(
MsgEntry* me);
   386     void SubstituteRacialMeshFact();
   396     void Move(
const csVector3 &
pos, 
const csVector3 &rotangle, 
const char* room);
   403     void Rotate(
float xRot, 
float yRot, 
float zRot);
   406     virtual void SetPosition(
const csVector3 &pos, 
const csVector3 &
rot, iSector* 
sector);
   409     virtual csVector3 GetPosition();
   416     virtual float GetRotation();
   419     virtual iSector* GetSector() 
const;
   422     virtual iSectorList* GetSectors() 
const;
   425     virtual const csBox3 &GetBBox() 
const;
   433     virtual int GetMasqueradeType();
   444     virtual void ChangeName(
const char* name);
   466         this->shadow = shadow;
   488     iMeshWrapper* GetMesh() 
const;
   490     virtual void Update();
   581     void GetLastPosition(csVector3 &
pos, 
float &yrot, iSector* &
sector);
   587     const csVector3 GetVelocity() 
const;
   589     float GetYRotation() 
const;
   591     virtual void SetPosition(
const csVector3 &pos, 
float rot, iSector* sector);
   595     void SetVelocity(
const csVector3 &vel);
   599     void SetYRotation(
const float yrot);
   601     void SetAlive(
bool aliveFlag, 
bool newactor);
   608         return masqueradeType;
   618     csVector3 Pos() 
const;
   619     csVector3 Rot() 
const;
   620     iSector* GetSector() 
const;
   622     virtual const char* 
GetName(
bool realName = 
true);
   633     bool NeedDRUpdate(
unsigned char &priority);
   634     void SendDRUpdate(
unsigned char priority,csStringHashReversible* msgstrings);
   636     void StopMoving(
bool worldVel = 
false);
   648     void SetMode(uint8_t mode, 
bool newactor = 
false);
   653     void SetIdleAnimation(
const char* anim);
   654     void SetAnimationVelocity(
const csVector3 &velocity);
   655     bool SetAnimation(
const char* anim, 
int duration=0);
   658     void SetChatBubbleID(
unsigned int chatBubbleID);
   659     unsigned GetChatBubbleID() 
const;
   669     int GetAnimIndex(csStringHashReversible* msgstrings, csStringID animid);
   677     virtual bool CheckLoadStatus();
   723     virtual void Update();
   740     virtual void SwitchToRealMesh(iMeshWrapper* mesh);
   742     void InitCharData(
const char* textures, 
const char* equipment);
   748     void SetCharacterMode(
size_t id);
   784     virtual bool CheckLoadStatus();
   787     virtual void PostLoad();
   789     csPtr<iMaterialWrapper> CloneMaterial(iMaterialWrapper* material);
   804     PostLoadData* post_load;
   805     csRef<iThreadReturn> factory;
   806     csRef<iThreadReturn> material;
   807     csRef<iShaderManager> shman;
   808     csRef<iStringSet> strings;
 virtual bool CheckLoadStatus()
Delayed mesh loading. 
 
csRef< MsgHandler > msghandler
 
psWorld is in charge of managing all regions (zone map files) and loading/unloading them as needed...
 
csRef< iMeshWrapper > rider
 
unsigned int chatBubbleID
 
This is a player or another 'alive' entity on the client. 
 
psLinearMovement * linmove
 
class psEntityLabels serves for creation and management of 2D sprites hanging above cel-entities that...
 
psEntityLabels * GetEntityLabels()
 
void SetMainPlayerName(const char *name)
 
unsigned int GetGroupID()
 
psClientVitals * vitalManager
The Vital of the player with regards to his health/mana/fatigue/etc. 
 
csRef< iMeshWrapper > pcmesh
 
const char * GetMainPlayerName()
 
psClientDR * GetClientDR()
 
GEMClientActor * local_player
 
An action location on the client. 
 
csRef< iThreadReturn > mountFactory
 
void SetGuildName(const char *guild)
 
virtual void PostLoad(bool)
Delayed load 'post-process'. 
 
Defines a character trait. 
 
const char * GetName(int id)
 
const char * GetFactName()
 
virtual GEMOBJECT_TYPE GetObjectType()
 
const char * GetGuildName()
 
psCharAppearance * CharAppearance()
 
The structure of 1 queue entry (pointer to a message) 
 
virtual bool IsAlive()
Indicate if this object is alive. 
 
UnresolvedPos(GEMClientObject *entity, const csVector3 &pos, const csVector3 &rot, const csString §or)
 
int flags
Various flags on the entity. 
 
This is information about an entity with unresolved position (=sector not found) This happens when so...
 
psWorld * GetWorld() const 
 
csPDelArray< Trait > traitList
 
csRef< iThreadReturn > material
 
A manager class that handles all the details of a characters appearance. 
 
Client version of the Cel Manager Requests world loading. 
 
virtual GEMOBJECT_TYPE GetObjectType()
 
uint8_t DRcounter
increments in loop to prevent out of order packet overwrites of better data 
 
csRef< csShaderVariable > position
 
Manages dead reckoning, char position and updates. 
 
Handles the incoming vital data from the server to update it's local values. 
 
csRef< iSector > unresSector
sector where we keep these entities 
 
csList< UnresolvedPos * > unresPos
list of entities with unresolved location 
 
psShadowManager * shadowManager
 
GEMClientObject * entity
our object .. 
 
Create shadows under the player/NPC/item entity. 
 
GEMClientActor * GetMainPlayer()
 
csRef< InstanceObject > instance
 
psClientVitals * GetVitalMgr()
Get the condition manager on this actor. 
 
const char * GetMeshName()
 
csRef< iMeshWrapper > pcmesh
 
virtual GEMOBJECT_TYPE GetObjectType()
 
csRef< iMeshFactoryWrapper > nullFactory
 
static void UnsetCelClient()
 
virtual const char * GetName()
 
void void Initialize(iObjectRegistry *object_reg)
 
bool IsUnresSector(iSector *sector)
 
csRef< CS::Animation::iSkeletonSpeedNode > speedNode
 
csRef< iSpriteCal3DState > cal3dstate
 
void SetEntityLabel(psEffect *el)
 
void SetGroupID(unsigned int id)
 
An object that the client knows about. 
 
This class is the client's and server's main interface for either sending network messages out or get...
 
csVector3 pos
.. and its position that could not be set 
 
csRef< iThreadReturn > factory
 
iSector * GetUnresSector()
 
virtual GEMOBJECT_TYPE GetObjectType()
 
csRef< iThreadReturn > meshFact
 
virtual bool IsAlive()
Indicate if this object is alive. 
 
int Flags()
Get the flag bit field. 
 
psEffect * GetEntityLabel()
 
virtual int GetMasqueradeType()
 
void SetShadow(psEffect *shadow)
 
psEntityLabels * entityLabels
 
const csPDelArray< GEMClientObject > & GetEntities() const 
 
csRef< CS::Mesh::iAnimatedMesh > animeshObject
 
csString player_name
name of player character 
 
psCharAppearance * charApp
 
csVector3 lastSentVelocity
 
csWeakRefArray< iSector > sectors
 
csHash< int, csStringID > anim_hash
 
psShadowManager * GetShadowManager()