Planeshift
|
Client version of the Cel Manager. More...
#include <pscelclient.h>
Classes | |
struct | Effect |
struct | ItemEffect |
struct | Light |
Public Member Functions | |
void | AddInstanceObject (const char *name, csRef< InstanceObject > object) |
Add an instance object to the tree. | |
void | AddNullFactory (const char *name, csRef< iMeshFactoryWrapper > object) |
void | AttachObject (iObject *object, GEMClientObject *clientObject) |
Attach a client object to a Crystal Space object. | |
void | CheckEntityQueues () |
Add one new actor or item entity from the queue. | |
GEMClientObject * | FindAttachedObject (iObject *object) |
See if there is a client object attached to a given object. | |
csPtr< InstanceObject > | FindInstanceObject (const char *name) const |
Search for an instance object and return it if existing. | |
csArray< GEMClientObject * > | FindNearbyEntities (iSector *sector, const csVector3 &pos, float radius, bool doInvisible=false) |
Create a list of all nearby GEM objects. | |
csPtr< iMeshFactoryWrapper > | FindNullFactory (const char *name) const |
GEMClientObject * | FindObject (EID eid) |
void | ForceEntityQueues () |
Add all new entities on the queue. | |
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. | |
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. | |
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. | |
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. | |
void | PruneEntities () |
psCelClient () | |
void | RemoveInstanceObject (const char *name) |
Remove an instance object to the tree. | |
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. | |
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. | |
void | Update (bool loaded) |
virtual | ~psCelClient () |
Protected Member Functions | |
void | AddEntity (GEMClientObject *obj) |
csList< UnresolvedPos * >::Iterator | FindUnresolvedPos (GEMClientObject *entity) |
Finds given entity in list of unresolved entities. | |
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. | |
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 | |
int | requeststatus |
psShadowManager * | shadowManager |
csList< UnresolvedPos * > | unresPos |
list of entities with unresolved location | |
csRef< iSector > | unresSector |
sector where we keep these entities | |
csRef< iVFS > | vfs |
Client version of the Cel Manager.
Definition at line 106 of file pscelclient.h.
psCelClient::psCelClient | ( | ) |
virtual psCelClient::~psCelClient | ( | ) | [virtual] |
void psCelClient::AddEntity | ( | GEMClientObject * | obj | ) | [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 | ) |
csList<UnresolvedPos*>::Iterator psCelClient::FindUnresolvedPos | ( | GEMClientObject * | entity | ) | [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 |
psClientDR* psCelClient::GetClientDR | ( | ) | [inline] |
Definition at line 169 of file pscelclient.h.
const csPDelArray<GEMClientObject>& psCelClient::GetEntities | ( | ) | const [inline] |
Definition at line 173 of file pscelclient.h.
psEntityLabels* psCelClient::GetEntityLabels | ( | ) | [inline] |
Definition at line 184 of file pscelclient.h.
GEMClientActor* psCelClient::GetMainPlayer | ( | ) | [inline] |
Definition at line 203 of file pscelclient.h.
const char* psCelClient::GetMainPlayerName | ( | ) | [inline] |
Definition at line 198 of file pscelclient.h.
int psCelClient::GetRequestStatus | ( | ) | [inline] |
Definition at line 242 of file pscelclient.h.
psShadowManager* psCelClient::GetShadowManager | ( | ) | [inline] |
Definition at line 188 of file pscelclient.h.
iSector* psCelClient::GetUnresSector | ( | ) | [inline] |
Definition at line 237 of file pscelclient.h.
psWorld* psCelClient::GetWorld | ( | ) | const [inline] |
Definition at line 220 of file pscelclient.h.
void psCelClient::HandleActionLocation | ( | MsgEntry * | me | ) | [protected] |
void psCelClient::HandleActor | ( | MsgEntry * | me | ) | [protected] |
void psCelClient::HandleGroupChange | ( | MsgEntry * | me | ) | [protected] |
void psCelClient::HandleGuildChange | ( | MsgEntry * | me | ) | [protected] |
void psCelClient::HandleItem | ( | MsgEntry * | me | ) | [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.
void psCelClient::HandleMecsActivate | ( | MsgEntry * | me | ) | [protected] |
virtual void psCelClient::HandleMessage | ( | MsgEntry * | me | ) | [virtual] |
Implements psClientNetSubscriber.
void psCelClient::HandleNameChange | ( | MsgEntry * | me | ) | [protected] |
void psCelClient::HandleObjectRemoval | ( | MsgEntry * | me | ) | [protected] |
void psCelClient::HandleStats | ( | MsgEntry * | me | ) | [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.
void psCelClient::HandleWorld | ( | MsgEntry * | me | ) | [protected] |
bool psCelClient::Initialize | ( | iObjectRegistry * | object_reg, |
MsgHandler * | msghandler | ||
) |
bool psCelClient::InstanceItems | ( | ) | [inline] |
Definition at line 315 of file pscelclient.h.
bool psCelClient::IsMeshSubjectToAction | ( | const char * | sector, |
const char * | mesh | ||
) |
bool psCelClient::IsReady | ( | ) |
bool psCelClient::IsUnresSector | ( | iSector * | sector | ) | [inline] |
Definition at line 233 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 | ) |
void psCelClient::SetMainPlayerName | ( | const char * | name | ) | [inline] |
Definition at line 193 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 | ) |
psClientDR* psCelClient::clientdr [protected] |
Definition at line 327 of file pscelclient.h.
psEntityLabels* psCelClient::entityLabels [protected] |
Definition at line 329 of file pscelclient.h.
psWorld* psCelClient::gameWorld [protected] |
Definition at line 332 of file pscelclient.h.
GEMClientActor* psCelClient::local_player [protected] |
Definition at line 352 of file pscelclient.h.
csRef<MsgHandler> psCelClient::msghandler [protected] |
Definition at line 326 of file pscelclient.h.
csString psCelClient::player_name [protected] |
name of player character
Definition at line 353 of file pscelclient.h.
int psCelClient::requeststatus [protected] |
Definition at line 324 of file pscelclient.h.
psShadowManager* psCelClient::shadowManager [protected] |
Definition at line 330 of file pscelclient.h.
csList<UnresolvedPos*> psCelClient::unresPos [protected] |
list of entities with unresolved location
Definition at line 355 of file pscelclient.h.
csRef<iSector> psCelClient::unresSector [protected] |
sector where we keep these entities
Definition at line 356 of file pscelclient.h.
csRef<iVFS> psCelClient::vfs [protected] |
Definition at line 325 of file pscelclient.h.