|
Zap::GameObject class Reference
Zap::GameObject Class Reference#include <gameObject.h>
Inheritance diagram for Zap::GameObject:
|
Public Types |
enum | IdleCallPath {
ServerIdleMainLoop,
ServerIdleControlFromClient,
ClientIdleMainRemote,
ClientIdleControlMain,
ClientIdleControlReplay
} |
Public Member Functions |
| GameObject () |
| ~GameObject () |
void | addToGame (Game *theGame) |
virtual void | onAddedToGame (Game *theGame) |
void | removeFromGame () |
Game * | getGame () |
void | deleteObject (U32 deleteTimeInterval=0) |
U32 | getCreationTime () |
bool | isInDatabase () |
void | setExtent (Rect &extentRect) |
Rect | getExtent () |
S32 | getTeam () |
void | findObjects (U32 typeMask, Vector< GameObject * > &fillVector, Rect &extents) |
GameObject * | findObjectLOS (U32 typeMask, U32 stateIndex, Point rayStart, Point rayEnd, float &collisionTime, Point &collisionNormal) |
bool | isControlled () |
void | setControllingClient (GameConnection *c) |
void | setOwner (GameConnection *c) |
GameConnection * | getControllingClient () |
GameConnection * | getOwner () |
U32 | getObjectTypeMask () |
F32 | getUpdatePriority (NetObject *scopeObject, U32 updateMask, S32 updateSkips) |
| Called to determine the relative update priority of an object.
|
virtual S32 | getRenderSortValue () |
virtual void | render () |
virtual void | render (U32 layerIndex) |
| render is called twice for every object that is in the render list.
|
virtual bool | getCollisionPoly (Vector< Point > &polyPoints) |
virtual bool | getCollisionCircle (U32 stateIndex, Point &point, float &radius) |
Rect | getBounds (U32 stateIndex) |
const Move & | getCurrentMove () |
const Move & | getLastMove () |
void | setCurrentMove (const Move &theMove) |
void | setLastMove (const Move &theMove) |
virtual void | idle (IdleCallPath path) |
virtual void | writeControlState (BitStream *stream) |
virtual void | readControlState (BitStream *stream) |
virtual F32 | getHealth () |
virtual bool | isDestroyed () |
virtual void | controlMoveReplayComplete () |
void | writeCompressedVelocity (Point &vel, U32 max, BitStream *stream) |
void | readCompressedVelocity (Point &vel, U32 max, BitStream *stream) |
virtual Point | getRenderPos () |
virtual Point | getActualPos () |
virtual Point | getRenderVel () |
virtual Point | getActualVel () |
virtual void | setActualPos (Point p) |
virtual bool | collide (GameObject *hitObject) |
void | radiusDamage (Point pos, F32 innerRad, F32 outerRad, U32 typemask, DamageInfo &info, F32 force=2000.f) |
virtual void | damageObject (DamageInfo *damageInfo) |
bool | onGhostAdd (GhostConnection *theConnection) |
| onGhostAdd is called on the client side of a connection after the constructor and after the first call to unpackUpdate (the initial call).
|
void | disableCollision () |
void | enableCollision () |
void | addToDatabase () |
void | removeFromDatabase () |
bool | isCollisionEnabled () |
virtual void | processArguments (S32 argc, const char **argv) |
void | setScopeAlways () |
Protected Attributes |
U32 | mObjectTypeMask |
Move | mLastMove |
| the move for the previous update
|
Move | mCurrentMove |
| The move for the current update.
|
S32 | mTeam |
Private Types |
typedef NetObject | Parent |
Private Attributes |
Game * | mGame |
U32 | mLastQueryId |
U32 | mCreationTime |
SafePtr< GameConnection > | mControllingClient |
SafePtr< GameConnection > | mOwner |
U32 | mDisableCollisionCount |
bool | mInDatabase |
Rect | extent |
Friends |
class | GridDatabase |
Member Typedef Documentation
|
Reimplemented from TNL::NetObject.
Reimplemented in Zap::CTFGameType, Zap::EngineeredObject, Zap::ForceFieldProjector, Zap::Turret, Zap::FlagItem, Zap::GoalZone, Zap::HuntersGameType, Zap::HuntersFlagItem, Zap::HuntersNexusObject, Zap::PickupItem, Zap::GrenadeProjectile, Zap::Mine, Zap::RabbitGameType, Zap::Ship, Zap::SoccerGameType, and Zap::SoccerBallItem. |
Member Enumeration Documentation
|
- Enumeration values:
-
ServerIdleMainLoop |
|
ServerIdleControlFromClient |
|
ClientIdleMainRemote |
|
ClientIdleControlMain |
|
ClientIdleControlReplay |
|
|
Constructor & Destructor Documentation
Zap::GameObject::GameObject |
( |
|
) |
|
|
Member Function Documentation
void Zap::GameObject::addToGame |
( |
Game * |
theGame |
) |
|
|
virtual void Zap::GameObject::onAddedToGame |
( |
Game * |
theGame |
) |
[virtual] |
|
void Zap::GameObject::removeFromGame |
( |
|
) |
|
|
Game* Zap::GameObject::getGame |
( |
|
) |
[inline] |
|
void Zap::GameObject::deleteObject |
( |
U32 |
deleteTimeInterval = 0 |
) |
|
|
U32 Zap::GameObject::getCreationTime |
( |
|
) |
[inline] |
|
bool Zap::GameObject::isInDatabase |
( |
|
) |
[inline] |
|
void Zap::GameObject::setExtent |
( |
Rect & |
extentRect |
) |
|
|
Rect Zap::GameObject::getExtent |
( |
|
) |
[inline] |
|
S32 Zap::GameObject::getTeam |
( |
|
) |
[inline] |
|
bool Zap::GameObject::isControlled |
( |
|
) |
[inline] |
|
U32 Zap::GameObject::getObjectTypeMask |
( |
|
) |
[inline] |
|
F32 Zap::GameObject::getUpdatePriority |
( |
NetObject * |
scopeObject, |
|
|
U32 |
updateMask, |
|
|
S32 |
updateSkips |
|
) |
[virtual] |
|
|
Called to determine the relative update priority of an object.
All objects that are in scope and that have out of date states are queried and sorted by priority before being updated. If there is not enough room in a single packet for all out of date objects, the skipped objects will have an incremented updateSkips the next time that connection prepares to send a packet. Typically the update priority is scaled by updateSkips so that as data becomes stale, it becomes more of a priority to update.
Reimplemented from TNL::NetObject. |
virtual S32 Zap::GameObject::getRenderSortValue |
( |
|
) |
[inline, virtual] |
|
virtual void Zap::GameObject::render |
( |
|
) |
[virtual] |
|
virtual void Zap::GameObject::render |
( |
U32 |
layerIndex |
) |
[virtual] |
|
|
render is called twice for every object that is in the render list.
By default GameObject will call the render() method one time (when layerIndex == 0).
Reimplemented in Zap::Barrier. |
virtual bool Zap::GameObject::getCollisionPoly |
( |
Vector< Point > & |
polyPoints |
) |
[virtual] |
|
virtual bool Zap::GameObject::getCollisionCircle |
( |
U32 |
stateIndex, |
|
|
Point & |
point, |
|
|
float & |
radius |
|
) |
[virtual] |
|
Rect Zap::GameObject::getBounds |
( |
U32 |
stateIndex |
) |
|
|
const Move& Zap::GameObject::getCurrentMove |
( |
|
) |
[inline] |
|
const Move& Zap::GameObject::getLastMove |
( |
|
) |
[inline] |
|
void Zap::GameObject::setCurrentMove |
( |
const Move & |
theMove |
) |
[inline] |
|
void Zap::GameObject::setLastMove |
( |
const Move & |
theMove |
) |
[inline] |
|
virtual void Zap::GameObject::idle |
( |
IdleCallPath |
path |
) |
[virtual] |
|
virtual void Zap::GameObject::writeControlState |
( |
BitStream * |
stream |
) |
[virtual] |
|
virtual void Zap::GameObject::readControlState |
( |
BitStream * |
stream |
) |
[virtual] |
|
virtual F32 Zap::GameObject::getHealth |
( |
|
) |
[inline, virtual] |
|
virtual bool Zap::GameObject::isDestroyed |
( |
|
) |
[inline, virtual] |
|
virtual void Zap::GameObject::controlMoveReplayComplete |
( |
|
) |
[virtual] |
|
void Zap::GameObject::writeCompressedVelocity |
( |
Point & |
vel, |
|
|
U32 |
max, |
|
|
BitStream * |
stream |
|
) |
|
|
void Zap::GameObject::readCompressedVelocity |
( |
Point & |
vel, |
|
|
U32 |
max, |
|
|
BitStream * |
stream |
|
) |
|
|
virtual Point Zap::GameObject::getRenderPos |
( |
|
) |
[virtual] |
|
virtual Point Zap::GameObject::getActualPos |
( |
|
) |
[virtual] |
|
virtual Point Zap::GameObject::getRenderVel |
( |
|
) |
[inline, virtual] |
|
virtual Point Zap::GameObject::getActualVel |
( |
|
) |
[inline, virtual] |
|
virtual void Zap::GameObject::setActualPos |
( |
Point |
p |
) |
[virtual] |
|
virtual bool Zap::GameObject::collide |
( |
GameObject * |
hitObject |
) |
[inline, virtual] |
|
|
Reimplemented in Zap::Barrier, Zap::EngineeredObject, Zap::ForceField, Zap::FlagItem, Zap::GoalZone, Zap::HuntersFlagItem, Zap::HuntersNexusObject, Zap::Item, Zap::PickupItem, Zap::MoveObject, Zap::GrenadeProjectile, Zap::Mine, and Zap::SoccerBallItem. |
virtual void Zap::GameObject::damageObject |
( |
DamageInfo * |
damageInfo |
) |
[virtual] |
|
bool Zap::GameObject::onGhostAdd |
( |
GhostConnection * |
theConnection |
) |
[virtual] |
|
|
onGhostAdd is called on the client side of a connection after the constructor and after the first call to unpackUpdate (the initial call).
Returning true signifies no error - returning false causes the connection to abort.
Reimplemented from TNL::NetObject. |
void Zap::GameObject::disableCollision |
( |
|
) |
[inline] |
|
void Zap::GameObject::enableCollision |
( |
|
) |
[inline] |
|
void Zap::GameObject::addToDatabase |
( |
|
) |
|
|
void Zap::GameObject::removeFromDatabase |
( |
|
) |
|
|
bool Zap::GameObject::isCollisionEnabled |
( |
|
) |
[inline] |
|
virtual void Zap::GameObject::processArguments |
( |
S32 |
argc, |
|
|
const char ** |
argv |
|
) |
[virtual] |
|
|
Reimplemented in Zap::EngineeredObject, Zap::FlagItem, Zap::GameType, Zap::GoalZone, Zap::HuntersGameType, Zap::HuntersNexusObject, Zap::Item, Zap::RabbitGameType, Zap::Ship, Zap::SoccerBallItem, and Zap::Teleporter. |
void Zap::GameObject::setScopeAlways |
( |
|
) |
|
|
Friends And Related Function Documentation
Field Documentation
|
the move for the previous update
|
|
The move for the current update.
|
|