Planeshift
Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions

psDRMessage Class Reference

#include <messages.h>

List of all members.

Public Member Functions

bool IsNewerThan (uint8_t oldCounter)
 Returns true if this message is newer than the passed DR sequence value.
void operator= (psDRMessage &other)
 psDRMessage (uint32_t client, EID mappedid, uint8_t counter, NetBase::AccessPointers *accessPointers, psLinearMovement *linmove, uint8_t mode=0)
 psDRMessage (void *data, int size, NetBase::AccessPointers *accessPointers)
 psDRMessage (uint32_t client, EID mappedid, bool on_ground, uint8_t mode, uint8_t counter, const csVector3 &pos, float yrot, iSector *sector, csString sectorName, const csVector3 &vel, csVector3 &worldVel, float ang_vel, NetBase::AccessPointers *accessPointers)
 psDRMessage (MsgEntry *me, NetBase::AccessPointers *accessPointers)
 psDRMessage ()
 PSF_DECLARE_MSG_FACTORY ()
virtual csString ToString (NetBase::AccessPointers *accessPointers)
 Converts the message into human readable string.

Public Attributes

float ang_vel
 Angular velocity of Yrot member changing.
uint8_t counter
 sequence checker byte
EID entityid
 The mapped id of the entity in question.
uint8_t mode
 Current character mode.
bool on_ground
 Helps determine whether gravity applies.
csVector3 pos
 Position vector.
iSector * sector
 Ptr to sector for mesh.
csString sectorName
 Name of the sector.
csVector3 vel
 Body Velocity vector.
csVector3 worldVel
 World velocity vector.
float yrot
 Rotation around Y-axis in radians.

Protected Types

enum  { ON_GOUND = 128 }
enum  DRDataFlags {
  NOT_MOVING = 0, ACTOR_MODE = 1 << 0, ANG_VELOCITY = 1 << 1, X_VELOCITY = 1 << 2,
  Y_VELOCITY = 1 << 3, Z_VELOCITY = 1 << 4, X_WORLDVELOCITY = 1 << 5, Y_WORLDVELOCITY = 1 << 6,
  Z_WORLDVELOCITY = 1 << 7, ALL_DATA = ~0
}
 

Flags indicating what components are packed in this message.

More...

Protected Member Functions

void CreateMsgEntry (uint32_t client, NetBase::AccessPointers *accessPointers, iSector *sector, csString sectorName)
void ReadDRInfo (MsgEntry *me, NetBase::AccessPointers *accessPointers)
void WriteDRInfo (uint32_t client, EID mappedid, bool on_ground, uint8_t mode, uint8_t counter, const csVector3 &pos, float yrot, iSector *sector, csString sectorName, const csVector3 &vel, csVector3 &worldVel, float ang_vel, csStringSet *msgstrings, bool donewriting=true)

Static Protected Member Functions

static uint8_t GetDataFlags (const csVector3 &v, const csVector3 &wv, float yrv, uint8_t mode)

Detailed Description

Definition at line 3126 of file messages.h.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
ON_GOUND 

Definition at line 3152 of file messages.h.

enum psDRMessage::DRDataFlags [protected]

Flags indicating what components are packed in this message.

Enumerator:
NOT_MOVING 
ACTOR_MODE 
ANG_VELOCITY 
X_VELOCITY 
Y_VELOCITY 
Z_VELOCITY 
X_WORLDVELOCITY 
Y_WORLDVELOCITY 
Z_WORLDVELOCITY 
ALL_DATA 

Definition at line 3138 of file messages.h.


Constructor & Destructor Documentation

psDRMessage::psDRMessage ( ) [inline]

Definition at line 3169 of file messages.h.

psDRMessage::psDRMessage ( uint32_t  client,
EID  mappedid,
uint8_t  counter,
NetBase::AccessPointers accessPointers,
psLinearMovement linmove,
uint8_t  mode = 0 
)
psDRMessage::psDRMessage ( uint32_t  client,
EID  mappedid,
bool  on_ground,
uint8_t  mode,
uint8_t  counter,
const csVector3 &  pos,
float  yrot,
iSector *  sector,
csString  sectorName,
const csVector3 &  vel,
csVector3 &  worldVel,
float  ang_vel,
NetBase::AccessPointers accessPointers 
)
psDRMessage::psDRMessage ( void *  data,
int  size,
NetBase::AccessPointers accessPointers 
)
psDRMessage::psDRMessage ( MsgEntry me,
NetBase::AccessPointers accessPointers 
)

Member Function Documentation

void psDRMessage::CreateMsgEntry ( uint32_t  client,
NetBase::AccessPointers accessPointers,
iSector *  sector,
csString  sectorName 
) [protected]
static uint8_t psDRMessage::GetDataFlags ( const csVector3 &  v,
const csVector3 &  wv,
float  yrv,
uint8_t  mode 
) [static, protected]
bool psDRMessage::IsNewerThan ( uint8_t  oldCounter)

Returns true if this message is newer than the passed DR sequence value.

void psDRMessage::operator= ( psDRMessage other)
psDRMessage::PSF_DECLARE_MSG_FACTORY ( )

Reimplemented in psPersistActor.

void psDRMessage::ReadDRInfo ( MsgEntry me,
NetBase::AccessPointers accessPointers 
) [protected]
virtual csString psDRMessage::ToString ( NetBase::AccessPointers accessPointers) [virtual]

Converts the message into human readable string.

Parameters:
accessPointersA struct to a number of access pointers.
Returns:
Return a human readable string for the message.

Implements psMessageCracker.

Reimplemented in psPersistActor.

void psDRMessage::WriteDRInfo ( uint32_t  client,
EID  mappedid,
bool  on_ground,
uint8_t  mode,
uint8_t  counter,
const csVector3 &  pos,
float  yrot,
iSector *  sector,
csString  sectorName,
const csVector3 &  vel,
csVector3 &  worldVel,
float  ang_vel,
csStringSet *  msgstrings,
bool  donewriting = true 
) [protected]

Member Data Documentation

Angular velocity of Yrot member changing.

Definition at line 3166 of file messages.h.

sequence checker byte

Definition at line 3157 of file messages.h.

The mapped id of the entity in question.

Definition at line 3167 of file messages.h.

Current character mode.

Definition at line 3159 of file messages.h.

Helps determine whether gravity applies.

Definition at line 3158 of file messages.h.

csVector3 psDRMessage::pos

Position vector.

Definition at line 3160 of file messages.h.

Ptr to sector for mesh.

Definition at line 3164 of file messages.h.

Name of the sector.

Definition at line 3165 of file messages.h.

csVector3 psDRMessage::vel

Body Velocity vector.

Definition at line 3160 of file messages.h.

World velocity vector.

Definition at line 3160 of file messages.h.

Rotation around Y-axis in radians.

Definition at line 3163 of file messages.h.


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