Planeshift
|
A gemObject is any solid, graphical object visible in PS with normal physics and normal collision detection. More...
#include <gem.h>
Public Member Functions | |
virtual void | Disconnect () |
Called when a client disconnects. More... | |
virtual void | Dump () |
Dump debug information. More... | |
gemActor * | GetActorPtr () |
gemActionLocation * | GetALPtr () |
virtual float | GetBaseAdvertiseRange () |
This value indicates the range that this entity would become visible to other entities if no other modifiers were taken into consideration. More... | |
virtual psCharacter * | GetCharacterData () |
virtual Client * | GetClient () const |
uint32_t | GetClientID () |
virtual csString | GetDefaultBehavior (const csString &dfltBehaviors) |
EID | GetEID () |
InstanceID | GetInstance () |
psItem * | GetItem () |
gemItem * | GetItemPtr () |
const char * | GetName () |
gemNPC * | GetNPCPtr () |
virtual const char * | GetObjectType () |
gemPet * | GetPetPtr () |
bool | IsAlive () const |
Returns whether the object is alive. More... | |
virtual bool | IsUpdateReq (csVector3 const &pos, csVector3 const &oldPos) |
virtual bool | IsValid (void) |
float | RangeTo (gemObject *obj, bool ignoreY=false, bool ignoreInstance=false) |
void | RegisterCallback (iDeleteObjectCallback *receiver) |
virtual void | SendBehaviorMessage (const csString &str, gemObject *obj) |
void | SetAlive (bool flag, bool queue=true) |
Set needed stats for alive or dead for object. More... | |
void | SetInstance (InstanceID newInstance) |
void | SetName (const char *n) |
void | UnregisterCallback (iDeleteObjectCallback *receiver) |
virtual | ~gemObject () |
iScriptableVar implementation | |
Functions that implement the iScriptableVar interface. | |
virtual double | GetProperty (MathEnvironment *env, const char *ptr) |
virtual double | CalcFunction (MathEnvironment *env, const char *functionName, const double *params) |
virtual const char * | ToString () |
Mesh related functions | |
iMeshWrapper * | GetMeshWrapper () |
csString | GetMesh () |
void | Move (const csVector3 &pos, float rotangle, iSector *room) |
bool | IsNear (gemObject *obj, float radius, bool ignoreY=false) |
const csVector3 & | GetPosition () |
void | GetPosition (csVector3 &pos, float &yrot, iSector *§or) |
void | GetPosition (csVector3 &pos, iSector *§or) |
float | GetAngle () |
Get rotation of entity as returned by psWorld::Matrix2YRot. More... | |
iSector * | GetSector () |
virtual float | GetVelocity () |
Get the z velocity of the actor. More... | |
const char * | GetSectorName () |
csArray< gemObject * > * | GetObjectsInRange (float range) |
Proxlist related functions. | |
ProximityList * | GetProxList () |
csArray< PublishDestination > & | GetMulticastClients () |
Returns all the clients which are inside our proxy list. More... | |
void | UpdateProxList (bool force=false) |
Generates proxlist if needed (or forced). More... | |
void | RemoveFromAllProx () |
void | SetAlwaysWatching (bool w) |
bool | AlwaysWatching () |
Networking functions | |
virtual void | Broadcast (int clientnum, bool control) |
virtual bool | Send (int clientnum, bool control, bool to_superclients, psPersistAllEntities *allEntities=NULL) |
Send this object to the given client. More... | |
virtual void | SendGroupMessage (MsgEntry *me) |
Distribute this object to all members of a group. More... | |
Overridden functions in child classes | |
virtual PID | GetPID () |
virtual int | GetGuildID () |
virtual psGuildInfo * | GetGuild () |
virtual bool | UpdateDR () |
virtual void | BroadcastTargetStatDR (ClientConnectionSet *clients) |
virtual void | SendTargetStatDR (Client *client) |
virtual psNPCDialog * | GetNPCDialogPtr () |
virtual void | GetLastSuperclientPos (csVector3 &pos, InstanceID &instance, csTicks &last) const |
virtual void | SetLastSuperclientPos (const csVector3 &pos, InstanceID instance, const csTicks &now) |
virtual void | AddLootablePlayer (PID playerID) |
virtual void | RemoveLootablePlayer (PID playerID) |
virtual bool | IsLootablePlayer (PID playerID) |
virtual Client * | GetRandomLootClient (int range) |
virtual AccountID | GetSuperclientID () |
virtual void | SetSuperclientID (AccountID id) |
virtual bool | GetVisibility () |
virtual bool | SeesObject (gemObject *object, float range) |
virtual gemObject * | GetOwner () |
virtual bool | HasKillStealProtection () |
Returns if the object has killsteal protection. More... | |
![]() | |
virtual | ~iDeleteNotificationObject () |
![]() | |
virtual | ~iScriptableVar () |
Protected Member Functions | |
gemObject (GEMSupervisor *gemsupervisor, EntityManager *entitymanager, CacheManager *cachemanager, const char *name, const char *factname, InstanceID myinstance, iSector *room, const csVector3 &pos, float rotangle, int clientnum) | |
void | InitMesh (const char *name, const csVector3 &pos, const float rotangle, iSector *room) |
bool | InitProximityList (float radius, int clientnum) |
Protected Attributes | |
bool | alwaysWatching |
True if this object always watches (proxlists) regardless of owner. More... | |
CacheManager * | cacheManager |
EID | eid |
Entity ID (unique identifier for object) More... | |
EntityManager * | entityManager |
csString | factname |
Name of CS Mesh Factory used to create this object. More... | |
bool | is_alive |
Flag indicating whether object is alive or not. More... | |
csString | matname |
Name of base material used by this object. More... | |
csString | name |
Name of this object, used mostly for debugging. More... | |
csRef< iMeshFactoryWrapper > | nullfact |
Null factory for our mesh instances. More... | |
gemMesh * | pcmesh |
link to mesh class More... | |
float | prox_distance_current |
What is the current actual range for proxlists (they adjust when the # of objects gets too high) More... | |
float | prox_distance_desired |
What is the maximum range of proxlist we want. More... | |
ProximityList * | proxlist |
Proximity List for this object. More... | |
csArray< iDeleteObjectCallback * > | receivers |
List of objects which are to be notified when this object is deleted. More... | |
bool | valid |
Is object fully loaded. More... | |
InstanceID | worldInstance |
Only objects which match instances can see each other. More... | |
Static Protected Attributes | |
static GEMSupervisor * | cel |
Static ptr back to main collection of all objects. More... | |
A gemObject is any solid, graphical object visible in PS with normal physics and normal collision detection.
|
virtual |
|
protected |
|
inlinevirtual |
|
virtual |
clientnum | The client that initiated this update. |
control | Set to true when sent to the controlling client. |
Reimplemented in gemNPC, gemActor, gemActionLocation, gemItem, and gemActiveObject.
|
inlinevirtual |
|
virtual |
Implements iScriptableVar.
|
virtual |
Called when a client disconnects.
|
virtual |
Dump debug information.
Used in the com_print function.
gemActor* gemObject::GetActorPtr | ( | ) |
gemActionLocation* gemObject::GetALPtr | ( | ) |
float gemObject::GetAngle | ( | ) |
Get rotation of entity as returned by psWorld::Matrix2YRot.
|
inlinevirtual |
This value indicates the range that this entity would become visible to other entities if no other modifiers were taken into consideration.
Reimplemented in gemActionLocation, and gemItem.
|
inlinevirtual |
|
inlinevirtual |
uint32_t gemObject::GetClientID | ( | ) |
|
virtual |
Reimplemented in gemNPC, gemActor, and gemActiveObject.
|
inlinevirtual |
|
inline |
psItem* gemObject::GetItem | ( | ) |
gemItem* gemObject::GetItemPtr | ( | ) |
|
inlinevirtual |
iMeshWrapper* gemObject::GetMeshWrapper | ( | ) |
csArray<PublishDestination>& gemObject::GetMulticastClients | ( | ) |
Returns all the clients which are inside our proxy list.
const char* gemObject::GetName | ( | ) |
|
inlinevirtual |
gemNPC* gemObject::GetNPCPtr | ( | ) |
|
inlinevirtual |
Reimplemented in gemPet, gemNPC, gemActor, gemActionLocation, gemItem, and gemActiveObject.
|
inlinevirtual |
gemPet* gemObject::GetPetPtr | ( | ) |
|
inlinevirtual |
const csVector3& gemObject::GetPosition | ( | ) |
void gemObject::GetPosition | ( | csVector3 & | pos, |
float & | yrot, | ||
iSector *& | sector | ||
) |
void gemObject::GetPosition | ( | csVector3 & | pos, |
iSector *& | sector | ||
) |
|
virtual |
Implements iScriptableVar.
|
inline |
iSector* gemObject::GetSector | ( | ) |
|
inlinevirtual |
|
virtual |
Get the z velocity of the actor.
Reimplemented in gemActor.
|
inlinevirtual |
Reimplemented in gemActor, gemActionLocation, and gemItem.
|
inlinevirtual |
|
protected |
|
inline |
|
inlinevirtual |
|
virtual |
void gemObject::Move | ( | const csVector3 & | pos, |
float | rotangle, | ||
iSector * | room | ||
) |
|
inlinevirtual |
Implements iDeleteNotificationObject.
void gemObject::RemoveFromAllProx | ( | ) |
|
inlinevirtual |
Reimplemented in gemActor, and gemActionLocation.
|
inlinevirtual |
Send this object to the given client.
clientnum | The client that initiated this update. |
control | Set to true when sent to the controlling client. |
to_superclients | Send to super clients |
allEntities | Buffer the message instead of sending it. |
Reimplemented in gemNPC, gemActor, gemActionLocation, gemItem, and gemActiveObject.
|
virtual |
Reimplemented in gemNPC, gemActor, gemActionLocation, gemItem, and gemActiveObject.
|
inlinevirtual |
|
inlinevirtual |
void gemObject::SetAlive | ( | bool | flag, |
bool | queue = true |
||
) |
Set needed stats for alive or dead for object.
When dead the mana and HP rate are set to 0.
flag | True if alive |
queue | Set to false to prevent queuing to superclients |
|
inline |
|
inlinevirtual |
void gemObject::SetName | ( | const char * | n | ) |
|
inlinevirtual |
|
inlinevirtual |
Implements iScriptableVar.
|
inlinevirtual |
Implements iDeleteNotificationObject.
|
inlinevirtual |
void gemObject::UpdateProxList | ( | bool | force = false | ) |
Generates proxlist if needed (or forced).
Then removes entities of nearby objects at clients, if needed.
force | Force an update if set to true. |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |