Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: Zap::ControlObjectConnection Class Reference

# Zap::ControlObjectConnection Class Reference

`#include <controlObjectConnection.h>`

Inheritance diagram for Zap::ControlObjectConnection:

## Public Member Functions

| ControlObjectConnection ()
void | setControlObject (GameObject *theObject)
GameObject * | getControlObject ()
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

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

## Private Attributes

Vector< Move > | pendingMoves
SafePtr< GameObject > | controlObject
U32 | mLastClientControlCRC
Point | mServerPosition
bool | mCompressPointsRelative
U32 | firstMoveIndex
U32 | highSendIndex [3]
U32 | mMoveTimeCredit

## Data Structures

struct | GamePacketNotify

## Member Typedef Documentation

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

Reimplemented from TNL::GhostConnection.

Reimplemented in Zap::GameConnection.

## Member Enumeration Documentation

anonymous enum`[private]`

Enumerator:

  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 |
| ) |  |  |

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 | ) |

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]`