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.

Zap::ControlObjectConnection class Reference

Zap::ControlObjectConnection Class Reference

#include <controlObjectConnection.h>

Inheritance diagram for Zap::ControlObjectConnection:

TNL::GhostConnection TNL::EventConnection TNL::NetConnection TNL::Object Zap::GameConnection

Public Member Functions

 ControlObjectConnection ()
void setControlObject (GameObject *theObject)
GameObjectgetControlObject ()
U32 getControlCRC ()
void addPendingMove (Move *theMove)
PacketNotify * allocNotify ()
 Override of EventConnection's allocNotify, to use the GhostPacketNotify structure.

void writePacket (BitStream *bstream, PacketNotify *notify)
 Override to write ghost updates into each packet.

void readPacket (BitStream *bstream)
 Override to read updated ghost information from the packet stream.

void packetReceived (PacketNotify *notify)
 Override to update flags associated with the ghosts updated in this packet.

void processMoveServer (Move *theMove)
void addToTimeCredit (U32 timeAmount)
bool isDataToTransmit ()
 Override to check if there is data pending on this GhostConnection.

void writeCompressedPoint (Point &p, BitStream *stream)
void readCompressedPoint (Point &p, BitStream *stream)

Private Types

typedef GhostConnection Parent
enum  {
  MaxPendingMoves = 63,
  MaxMoveTimeCredit = 512
}

Private Attributes

Vector< MovependingMoves
SafePtr< GameObjectcontrolObject
U32 mLastClientControlCRC
Point mServerPosition
bool mCompressPointsRelative
U32 firstMoveIndex
U32 highSendIndex [3]
U32 mMoveTimeCredit

Member Typedef Documentation

typedef GhostConnection Zap::ControlObjectConnection::Parent [private]
 

Reimplemented from TNL::GhostConnection.

Reimplemented in Zap::GameConnection.


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
MaxPendingMoves 
MaxMoveTimeCredit 


Constructor & Destructor Documentation

Zap::ControlObjectConnection::ControlObjectConnection  ) 
 


Member Function Documentation

void Zap::ControlObjectConnection::setControlObject GameObject theObject  ) 
 

GameObject* Zap::ControlObjectConnection::getControlObject  )  [inline]
 

U32 Zap::ControlObjectConnection::getControlCRC  ) 
 

void Zap::ControlObjectConnection::addPendingMove Move theMove  )  [inline]
 

PacketNotify* Zap::ControlObjectConnection::allocNotify  )  [inline, virtual]
 

Override of EventConnection's allocNotify, to use the GhostPacketNotify structure.

Reimplemented from TNL::GhostConnection.

void Zap::ControlObjectConnection::writePacket BitStream *  bstream,
PacketNotify *  notify
[virtual]
 

Override to write ghost updates into each packet.

Reimplemented from TNL::GhostConnection.

void Zap::ControlObjectConnection::readPacket BitStream *  bstream  )  [virtual]
 

Override to read updated ghost information from the packet stream.

Reimplemented from TNL::GhostConnection.

void Zap::ControlObjectConnection::packetReceived PacketNotify *  notify  )  [virtual]
 

Override to update flags associated with the ghosts updated in this packet.

Reimplemented from TNL::GhostConnection.

void Zap::ControlObjectConnection::processMoveServer Move theMove  ) 
 

void Zap::ControlObjectConnection::addToTimeCredit U32  timeAmount  )  [inline]
 

bool Zap::ControlObjectConnection::isDataToTransmit  )  [inline, virtual]
 

Override to check if there is data pending on this GhostConnection.

Reimplemented from TNL::GhostConnection.

void Zap::ControlObjectConnection::writeCompressedPoint Point p,
BitStream *  stream
 

void Zap::ControlObjectConnection::readCompressedPoint Point p,
BitStream *  stream
 


Field Documentation

Vector<Move> Zap::ControlObjectConnection::pendingMoves [private]
 

SafePtr<GameObject> Zap::ControlObjectConnection::controlObject [private]
 

U32 Zap::ControlObjectConnection::mLastClientControlCRC [private]
 

Point Zap::ControlObjectConnection::mServerPosition [private]
 

bool Zap::ControlObjectConnection::mCompressPointsRelative [private]
 

U32 Zap::ControlObjectConnection::firstMoveIndex [private]
 

U32 Zap::ControlObjectConnection::highSendIndex[3] [private]
 

U32 Zap::ControlObjectConnection::mMoveTimeCredit [private]