Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: 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

NetObject * | obj
| The real object on the server.
U32 | updateMask
| The current out-of-date state mask for the object for this connection.
GhostConnection::GhostRef * | 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 * | nextObjectRef
| Next GhostInfo for this object in the doubly linked list of GhostInfos across all connections that scope this object.
GhostInfo * | prevObjectRef
| Previous GhostInfo for this object in the doubly linked list of GhostInfos across all connections that scope this object.
GhostConnection * | connection
| The connection that owns this GhostInfo.
GhostInfo * | nextLookupInfo
| 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

Enumerator:

  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.