News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

TNL::GhostInfo struct Reference

TNL::GhostInfo Struct Reference

#include <tnlGhostConnection.h>


Detailed Description

Each GhostInfo structure tracks the state of a single NetObject's ghost for a single GhostConnection.


Public Types

enum  Flags {
  InScope = BIT(0),
  ScopeLocalAlways = BIT(1),
  NotYetGhosted = BIT(2),
  Ghosting = BIT(3),
  KillGhost = BIT(4),
  KillingGhost = BIT(5),
  NotAvailable = (NotYetGhosted | Ghosting | KillGhost | KillingGhost)
}

Data Fields

NetObjectobj
 The real object on the server.

U32 updateMask
 The current out-of-date state mask for the object for this connection.

GhostConnection::GhostReflastUpdateChain
 The GhostRef for this object in the last packet it was updated in, or NULL if that last packet has been notified yet.

GhostInfonextObjectRef
 Next GhostInfo for this object in the doubly linked list of GhostInfos across all connections that scope this object.

GhostInfoprevObjectRef
 Previous GhostInfo for this object in the doubly linked list of GhostInfos across all connections that scope this object.

GhostConnectionconnection
 The connection that owns this GhostInfo.

GhostInfonextLookupInfo
 Next GhostInfo in the hash table for NetObject*->GhostInfo*.

U32 updateSkipCount
 How many times this object has NOT been updated in writePacket.

U32 flags
 Current flag status of this object for this connection.

F32 priority
 Priority for the update of this object, computed after the scoping process has run.

U32 index
 Fixed index of the object in the mGhostRefs array for the connection, and the ghostId of the object on the client.

S32 arrayIndex
 Position of the object in the mGhostArray for the connection, which changes as the object is pushed to zero, non-zero and free.


Member Enumeration Documentation

enum TNL::GhostInfo::Flags
 

Enumeration values:
InScope  This GhostInfo's NetObject is currently in scope for this connection.
ScopeLocalAlways  This GhostInfo's NetObject is always in scope for this connection.
NotYetGhosted  This GhostInfo's NetObject has not been sent to or constructed on the remote host.
Ghosting  This GhostInfo's NetObject has been sent to the client, but the packet it was sent in hasn't been acked yet.
KillGhost  The ghost of this GhostInfo's NetObject should be destroyed ASAP.
KillingGhost  The ghost of this GhostInfo's NetObject is in the process of being destroyed.
NotAvailable  Flag mask - if any of these are set, the object is not yet available for ghost ID lookup.


Field Documentation

NetObject* TNL::GhostInfo::obj
 

The real object on the server.

U32 TNL::GhostInfo::updateMask
 

The current out-of-date state mask for the object for this connection.

GhostConnection::GhostRef* TNL::GhostInfo::lastUpdateChain
 

The GhostRef for this object in the last packet it was updated in, or NULL if that last packet has been notified yet.

GhostInfo* TNL::GhostInfo::nextObjectRef
 

Next GhostInfo for this object in the doubly linked list of GhostInfos across all connections that scope this object.

GhostInfo* TNL::GhostInfo::prevObjectRef
 

Previous GhostInfo for this object in the doubly linked list of GhostInfos across all connections that scope this object.

GhostConnection* TNL::GhostInfo::connection
 

The connection that owns this GhostInfo.

GhostInfo* TNL::GhostInfo::nextLookupInfo
 

Next GhostInfo in the hash table for NetObject*->GhostInfo*.

U32 TNL::GhostInfo::updateSkipCount
 

How many times this object has NOT been updated in writePacket.

U32 TNL::GhostInfo::flags
 

Current flag status of this object for this connection.

F32 TNL::GhostInfo::priority
 

Priority for the update of this object, computed after the scoping process has run.

U32 TNL::GhostInfo::index
 

Fixed index of the object in the mGhostRefs array for the connection, and the ghostId of the object on the client.

S32 TNL::GhostInfo::arrayIndex
 

Position of the object in the mGhostArray for the connection, which changes as the object is pushed to zero, non-zero and free.