Planeshift
|
Client version of the Cel Manager Requests world loading. More...
#include <pscelclient.h>
Public Member Functions | |
void | AddInstanceObject (const char *name, csRef< InstanceObject > object) |
Add an instance object to the tree. More... | |
void | AddNullFactory (const char *name, csRef< iMeshFactoryWrapper > object) |
void | AttachObject (iObject *object, GEMClientObject *clientObject) |
Attach a client object to a Crystal Space object. More... | |
void | CheckEntityQueues () |
Add one new actor or item entity from the queue. More... | |
GEMClientObject * | FindAttachedObject (iObject *object) |
See if there is a client object attached to a given object. More... | |
csPtr< InstanceObject > | FindInstanceObject (const char *name) const |
Search for an instance object and return it if existing. More... | |
csArray< GEMClientObject * > | FindNearbyEntities (iSector *sector, const csVector3 &pos, float radius, bool doInvisible=false) |
Create a list of all nearby GEM objects. More... | |
csPtr< iMeshFactoryWrapper > | FindNullFactory (const char *name) const |
GEMClientObject * | FindObject (EID eid) |
void | ForceEntityQueues () |
Add all new entities on the queue. More... | |
GEMClientActor * | GetActorByName (const char *name, bool trueName=true) const |
psClientDR * | GetClientDR () |
const csPDelArray< GEMClientObject > & | GetEntities () const |
psEntityLabels * | GetEntityLabels () |
GEMClientActor * | GetMainPlayer () |
const char * | GetMainPlayerName () |
int | GetRequestStatus () |
psShadowManager * | GetShadowManager () |
iSector * | GetUnresSector () |
psWorld * | GetWorld () const |
void | HandleItemEffect (const char *factName, iMeshWrapper *mw, bool onGround=true, const char *slot=0, csHash< int, csString > *effectids=0, csHash< int, csString > *lightids=0) |
Check if the item has an effect attached to it and process it if so. More... | |
virtual void | HandleMessage (MsgEntry *me) |
void | HandleUnresolvedPos (GEMClientObject *entity, const csVector3 &pos, const csVector3 &rot, const csString §or) |
This is called when position of some entity could not be resolved (see the UnresolvedPos struct) It adds this position to list of unresolved positions which we will attempt to resolve later and moves the entity to special sector that keeps these unfortunate entities. More... | |
bool | Initialize (iObjectRegistry *object_reg, MsgHandler *msghandler) |
bool | InstanceItems () |
bool | IsMeshSubjectToAction (const char *sector, const char *mesh) |
bool | IsReady () |
bool | IsUnresSector (iSector *sector) |
void | OnMapsLoaded () |
Called when new world maps were loaded CelClient looks for GEM Objects which have sectors with unknown name and checks if this name is known now. More... | |
void | OnRegionsDeleted (csArray< iCollection * > ®ions) |
Called when a region of the world is deleted from the client (because we don't need it loaded now) CelClient removes all GEMClientObjects that are in this region. More... | |
void | PruneEntities () |
psCelClient () | |
void | RemoveInstanceObject (const char *name) |
Remove an instance object to the tree. More... | |
void | RemoveNullFactory (const char *name) |
void | RemoveObject (GEMClientObject *entity) |
void | replaceRacialGroup (csString &string) |
Substituites in a string the group identifiers like $H $B etc depending on the race of the player. More... | |
void | RequestActor () |
void | RequestServerWorld () |
void | SetMainActor (GEMClientActor *object) |
void | SetMainPlayerName (const char *name) |
void | SetPlayerReady (bool flag) |
void | SetupWorldColliders () |
void | UnattachObject (iObject *object, GEMClientObject *clientObject) |
Unattach a client object from a Crystal Space object. More... | |
void | Update (bool loaded) |
virtual | ~psCelClient () |
![]() | |
virtual void | HandleMessage (MsgEntry *msg, Client *) |
Interprets a received message and executes the command. More... | |
virtual bool | Verify (MsgEntry *, unsigned int, Client *&) |
virtual | ~psClientNetSubscriber () |
Protected Member Functions | |
void | AddEntity (GEMClientObject *obj) |
csList< UnresolvedPos * >::Iterator | FindUnresolvedPos (GEMClientObject *entity) |
Finds given entity in list of unresolved entities. More... | |
void | HandleActionLocation (MsgEntry *me) |
void | HandleActor (MsgEntry *me) |
void | HandleGroupChange (MsgEntry *me) |
void | HandleGuildChange (MsgEntry *me) |
void | HandleItem (MsgEntry *me) |
void | HandleMecsActivate (MsgEntry *me) |
void | HandleNameChange (MsgEntry *me) |
void | HandleObjectRemoval (MsgEntry *me) |
void | HandleStats (MsgEntry *me) |
Handles a stats message from the server. More... | |
void | HandleWorld (MsgEntry *me) |
Protected Attributes | |
psClientDR * | clientdr |
psEntityLabels * | entityLabels |
psWorld * | gameWorld |
GEMClientActor * | local_player |
csRef< MsgHandler > | msghandler |
csString | player_name |
name of player character More... | |
int | requeststatus |
psShadowManager * | shadowManager |
csList< UnresolvedPos * > | unresPos |
list of entities with unresolved location More... | |
csRef< iSector > | unresSector |
sector where we keep these entities More... | |
csRef< iVFS > | vfs |
Client version of the Cel Manager Requests world loading.
Handles entities client side, attaching players and objects to meshes, placing lights, and effects, ....
Definition at line 108 of file pscelclient.h.
psCelClient::psCelClient | ( | ) |
|
virtual |
|
protected |
void psCelClient::AddInstanceObject | ( | const char * | name, |
csRef< InstanceObject > | object | ||
) |
Add an instance object to the tree.
void psCelClient::AddNullFactory | ( | const char * | name, |
csRef< iMeshFactoryWrapper > | object | ||
) |
void psCelClient::AttachObject | ( | iObject * | object, |
GEMClientObject * | clientObject | ||
) |
Attach a client object to a Crystal Space object.
In most cases the Crystal Space object is a meshwrapper.
object | The Crystal Space object we want to attach our client object to. |
clientObject | The client object we want to attach. |
void psCelClient::CheckEntityQueues | ( | ) |
Add one new actor or item entity from the queue.
GEMClientObject* psCelClient::FindAttachedObject | ( | iObject * | object | ) |
See if there is a client object attached to a given object.
object | The Cyrstal Space object we want to see if there is a client object attached to. |
csPtr<InstanceObject> psCelClient::FindInstanceObject | ( | const char * | name | ) | const |
Search for an instance object and return it if existing.
Else return 0 csPtr.
csArray<GEMClientObject*> psCelClient::FindNearbyEntities | ( | iSector * | sector, |
const csVector3 & | pos, | ||
float | radius, | ||
bool | doInvisible = false |
||
) |
Create a list of all nearby GEM objects.
sector | The sector to check in. |
pos | The starting position |
radius | The distance around the starting point to check. |
doInvisible | If true check invisible meshes otherwise ignore them. |
csPtr<iMeshFactoryWrapper> psCelClient::FindNullFactory | ( | const char * | name | ) | const |
GEMClientObject* psCelClient::FindObject | ( | EID | eid | ) |
|
protected |
Finds given entity in list of unresolved entities.
void psCelClient::ForceEntityQueues | ( | ) |
Add all new entities on the queue.
GEMClientActor* psCelClient::GetActorByName | ( | const char * | name, |
bool | trueName = true |
||
) | const |
|
inline |
Definition at line 171 of file pscelclient.h.
|
inline |
Definition at line 175 of file pscelclient.h.
|
inline |
Definition at line 186 of file pscelclient.h.
|
inline |
Definition at line 205 of file pscelclient.h.
|
inline |
Definition at line 200 of file pscelclient.h.
|
inline |
Definition at line 244 of file pscelclient.h.
|
inline |
Definition at line 190 of file pscelclient.h.
|
inline |
Definition at line 239 of file pscelclient.h.
|
inline |
Definition at line 222 of file pscelclient.h.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void psCelClient::HandleItemEffect | ( | const char * | factName, |
iMeshWrapper * | mw, | ||
bool | onGround = true , |
||
const char * | slot = 0 , |
||
csHash< int, csString > * | effectids = 0 , |
||
csHash< int, csString > * | lightids = 0 |
||
) |
Check if the item has an effect attached to it and process it if so.
|
protected |
|
virtual |
Implements psClientNetSubscriber.
|
protected |
|
protected |
|
protected |
Handles a stats message from the server.
This basically just publishes the data to PAWS so various widgets can be updated.
void psCelClient::HandleUnresolvedPos | ( | GEMClientObject * | entity, |
const csVector3 & | pos, | ||
const csVector3 & | rot, | ||
const csString & | sector | ||
) |
This is called when position of some entity could not be resolved (see the UnresolvedPos struct) It adds this position to list of unresolved positions which we will attempt to resolve later and moves the entity to special sector that keeps these unfortunate entities.
|
protected |
bool psCelClient::Initialize | ( | iObjectRegistry * | object_reg, |
MsgHandler * | msghandler | ||
) |
|
inline |
Definition at line 317 of file pscelclient.h.
bool psCelClient::IsMeshSubjectToAction | ( | const char * | sector, |
const char * | mesh | ||
) |
bool psCelClient::IsReady | ( | ) |
|
inline |
Definition at line 235 of file pscelclient.h.
void psCelClient::OnMapsLoaded | ( | ) |
Called when new world maps were loaded CelClient looks for GEM Objects which have sectors with unknown name and checks if this name is known now.
void psCelClient::OnRegionsDeleted | ( | csArray< iCollection * > & | regions | ) |
Called when a region of the world is deleted from the client (because we don't need it loaded now) CelClient removes all GEMClientObjects that are in this region.
void psCelClient::PruneEntities | ( | ) |
void psCelClient::RemoveInstanceObject | ( | const char * | name | ) |
Remove an instance object to the tree.
void psCelClient::RemoveNullFactory | ( | const char * | name | ) |
void psCelClient::RemoveObject | ( | GEMClientObject * | entity | ) |
void psCelClient::replaceRacialGroup | ( | csString & | string | ) |
Substituites in a string the group identifiers like $H $B etc depending on the race of the player.
string | The string where do to the replacements |
void psCelClient::RequestActor | ( | ) |
void psCelClient::RequestServerWorld | ( | ) |
void psCelClient::SetMainActor | ( | GEMClientActor * | object | ) |
|
inline |
Definition at line 195 of file pscelclient.h.
void psCelClient::SetPlayerReady | ( | bool | flag | ) |
void psCelClient::SetupWorldColliders | ( | ) |
void psCelClient::UnattachObject | ( | iObject * | object, |
GEMClientObject * | clientObject | ||
) |
Unattach a client object from a Crystal Space object.
In most cases the Crystal Space object is a meshwrapper.
object | The Crystal Space object we want to unattach our client object from. |
clientObject | The client object we want to unattach. |
void psCelClient::Update | ( | bool | loaded | ) |
|
protected |
Definition at line 329 of file pscelclient.h.
|
protected |
Definition at line 331 of file pscelclient.h.
|
protected |
Definition at line 334 of file pscelclient.h.
|
protected |
Definition at line 354 of file pscelclient.h.
|
protected |
Definition at line 328 of file pscelclient.h.
|
protected |
name of player character
Definition at line 355 of file pscelclient.h.
|
protected |
Definition at line 326 of file pscelclient.h.
|
protected |
Definition at line 332 of file pscelclient.h.
|
protected |
list of entities with unresolved location
Definition at line 357 of file pscelclient.h.
|
protected |
sector where we keep these entities
Definition at line 358 of file pscelclient.h.
|
protected |
Definition at line 327 of file pscelclient.h.