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::ForceField class Reference

Zap::ForceField Class Reference

#include <engineeredObjects.h>

Inheritance diagram for Zap::ForceField:

Zap::GameObject TNL::NetObject TNL::Object

Public Types

enum  Constants {
  InitialMask = BIT(0),
  StatusMask = BIT(1),
  FieldDownTime = 250
}

Public Member Functions

 ForceField (S32 team=-1, Point start=Point(), Point end=Point())
bool collide (GameObject *hitObject)
void idle (GameObject::IdleCallPath path)
U32 packUpdate (GhostConnection *connection, U32 updateMask, BitStream *stream)
 Write the object's state to a packet.

void unpackUpdate (GhostConnection *connection, BitStream *stream)
 Unpack data written by packUpdate().

bool getCollisionPoly (Vector< Point > &polyPoints)
void render ()
S32 getRenderSortValue ()
 TNL_DECLARE_CLASS (ForceField)

Private Attributes

Point mStart
Point mEnd
Timer mDownTimer
bool mFieldUp

Member Enumeration Documentation

enum Zap::ForceField::Constants
 

Enumeration values:
InitialMask 
StatusMask 
FieldDownTime 


Constructor & Destructor Documentation

Zap::ForceField::ForceField S32  team = -1,
Point  start = Point(),
Point  end = Point()
 


Member Function Documentation

bool Zap::ForceField::collide GameObject hitObject  )  [virtual]
 

Reimplemented from Zap::GameObject.

void Zap::ForceField::idle GameObject::IdleCallPath  path  ) 
 

U32 Zap::ForceField::packUpdate GhostConnection connection,
U32  updateMask,
BitStream *  stream
[virtual]
 

Write the object's state to a packet.

packUpdate is called on an object when it is to be written into a packet stream for transmission to the client. The updateMask parameter contains the out-of-date state mask for the object. The initial update mask for any object to a client will always be 0xFFFFFFFF, signifying that all states are out of date. It is often useful to check for this mask, to write one-time initialization information for that object.

Reimplemented from TNL::NetObject.

void Zap::ForceField::unpackUpdate GhostConnection connection,
BitStream *  stream
[virtual]
 

Unpack data written by packUpdate().

unpackUpdate is called on the client to read an update out of a packet's bit stream. Because the update mask is not encoded by the network system directly, each unpack update function will have to determine from the bit stream which states are being updated.

Reimplemented from TNL::NetObject.

bool Zap::ForceField::getCollisionPoly Vector< Point > &  polyPoints  )  [virtual]
 

Reimplemented from Zap::GameObject.

void Zap::ForceField::render  )  [virtual]
 

Reimplemented from Zap::GameObject.

S32 Zap::ForceField::getRenderSortValue  )  [inline, virtual]
 

Reimplemented from Zap::GameObject.

Zap::ForceField::TNL_DECLARE_CLASS ForceField   ) 
 


Field Documentation

Point Zap::ForceField::mStart [private]
 

Point Zap::ForceField::mEnd [private]
 

Timer Zap::ForceField::mDownTimer [private]
 

bool Zap::ForceField::mFieldUp [private]