|
Zap::GameType class Reference
Zap::GameType Class Reference#include <gameType.h>
Inheritance diagram for Zap::GameType:
|
Public Types |
enum | { RespawnDelay = 1500
} |
enum | {
MaxPing = 999,
DefaultGameTime = 20 * 60 * 1000,
DefaultTeamScoreLimit = 8,
LevelInfoDisplayTime = 6000
} |
Public Member Functions |
virtual const char * | getGameTypeString () |
virtual const char * | getInstructionString () |
virtual ClientRef * | allocClientRef () |
void | addItemOfInterest (Item *theItem) |
| GameType () |
void | countTeamPlayers () |
Color | getClientColor (const StringTableEntry &clientName) |
ClientRef * | findClientRef (const StringTableEntry &name) |
void | processArguments (S32 argc, const char **argv) |
virtual bool | processLevelItem (S32 argc, const char **argv) |
void | onAddedToGame (Game *theGame) |
void | idle (GameObject::IdleCallPath path) |
void | gameOverManGameOver () |
virtual void | onGameOver () |
virtual void | serverAddClient (GameConnection *theClient) |
virtual void | serverRemoveClient (GameConnection *theClient) |
virtual bool | objectCanDamageObject (GameObject *damager, GameObject *victim) |
virtual void | controlObjectForClientKilled (GameConnection *theClient, GameObject *clientObject, GameObject *killerObject) |
virtual void | spawnShip (GameConnection *theClient) |
virtual void | changeClientTeam (GameConnection *theClient) |
virtual void | renderInterfaceOverlay (bool scoreboardVisible) |
void | renderObjectiveArrow (GameObject *target, Color c, F32 alphaMod=1.0f) |
void | renderObjectiveArrow (Point p, Color c, F32 alphaMod=1.0f) |
void | renderTimeLeft () |
void | renderTalkingClients () |
virtual void | clientRequestLoadout (GameConnection *client, const Vector< U32 > &loadout) |
virtual void | updateShipLoadout (GameObject *shipObject) |
void | setClientShipLoadout (ClientRef *cl, const Vector< U32 > &loadout) |
virtual Color | getShipColor (Ship *s) |
Color | getTeamColor (S32 team) |
Color | getTeamColor (GameObject *theObject) |
virtual void | addFlag (FlagItem *theFlag) |
virtual void | flagDropped (Ship *theShip, FlagItem *theFlag) |
virtual void | shipTouchFlag (Ship *theShip, FlagItem *theFlag) |
virtual void | addZone (GoalZone *theZone) |
virtual void | shipTouchZone (Ship *theShip, GoalZone *theZone) |
void | queryItemsOfInterest () |
void | performScopeQuery (GhostConnection *connection) |
| For a scope object, determine what is in scope.
|
virtual void | performProxyScopeQuery (GameObject *scopeObject, GameConnection *connection) |
void | onGhostAvailable (GhostConnection *theConnection) |
| onGhostAvailable is called on the server side after the server knows that the ghost is available and addressable via the getGhostIndex().
|
| TNL_DECLARE_RPC (s2cSetLevelInfo,(StringTableEntry levelName, StringTableEntry levelDesc)) |
| TNL_DECLARE_RPC (s2cAddBarriers,(Vector< F32 > barrier, F32 width)) |
| TNL_DECLARE_RPC (s2cAddTeam,(StringTableEntry teamName, F32 r, F32 g, F32 b)) |
| TNL_DECLARE_RPC (s2cAddClient,(StringTableEntry clientName, bool isMyClient)) |
| TNL_DECLARE_RPC (s2cClientJoinedTeam,(StringTableEntry clientName, U32 teamIndex)) |
| TNL_DECLARE_RPC (s2cSyncMessagesComplete,(U32 sequence)) |
| TNL_DECLARE_RPC (c2sSyncMessagesComplete,(U32 sequence)) |
| TNL_DECLARE_RPC (s2cSetGameOver,(bool gameOver)) |
| TNL_DECLARE_RPC (s2cSetTimeRemaining,(U32 timeLeft)) |
| TNL_DECLARE_RPC (s2cRemoveClient,(StringTableEntry clientName)) |
void | setTeamScore (S32 teamIndex, S32 newScore) |
| TNL_DECLARE_RPC (s2cSetTeamScore,(U32 teamIndex, U32 score)) |
| TNL_DECLARE_RPC (c2sRequestScoreboardUpdates,(bool updates)) |
| TNL_DECLARE_RPC (s2cScoreboardUpdate,(Vector< RangedU32< 0, MaxPing > > pingTimes, Vector< SignedInt< 24 > > scores)) |
virtual void | updateClientScoreboard (ClientRef *theClient) |
| TNL_DECLARE_RPC (c2sAdvanceWeapon,()) |
virtual void | addClientGameMenuOptions (Vector< MenuItem > &menuOptions) |
virtual void | processClientGameMenuOption (U32 index) |
| TNL_DECLARE_RPC (c2sChangeTeams,()) |
void | sendChatDisplayEvent (ClientRef *cl, bool global, NetEvent *theEvent) |
| TNL_DECLARE_RPC (c2sSendChat,(bool global, StringPtr message)) |
| TNL_DECLARE_RPC (c2sSendChatSTE,(bool global, StringTableEntry ste)) |
| TNL_DECLARE_RPC (s2cDisplayChatMessage,(bool global, StringTableEntry clientName, StringPtr message)) |
| TNL_DECLARE_RPC (s2cDisplayChatMessageSTE,(bool global, StringTableEntry clientName, StringTableEntry message)) |
| TNL_DECLARE_RPC (s2cKillMessage,(StringTableEntry victim, StringTableEntry killer)) |
| TNL_DECLARE_RPC (c2sVoiceChat,(bool echo, ByteBufferPtr compressedVoice)) |
| TNL_DECLARE_RPC (s2cVoiceChat,(StringTableEntry client, ByteBufferPtr compressedVoice)) |
| TNL_DECLARE_CLASS (GameType) |
Data Fields |
Vector< BarrierRec > | mBarriers |
Vector< RefPtr< ClientRef > > | mClientList |
Vector< Team > | mTeams |
StringTableEntry | mLevelName |
StringTableEntry | mLevelDescription |
Vector< ItemOfInterest > | mItemsOfInterest |
Timer | mScoreboardUpdateTimer |
Timer | mGameTimer |
Timer | mGameTimeUpdateTimer |
Timer | mLevelInfoDisplayTimer |
S32 | mTeamScoreLimit |
bool | mGameOver |
Static Public Attributes |
Vector< RangedU32< 0, MaxPing > > | mPingTimes |
| Static vector used for constructing update RPCs.
|
Vector< SignedInt< 24 > > | mScores |
Member Enumeration Documentation
|
- Enumeration values:
-
MaxPing |
|
DefaultGameTime |
|
DefaultTeamScoreLimit |
|
LevelInfoDisplayTime |
|
|
Constructor & Destructor Documentation
Zap::GameType::GameType |
( |
|
) |
|
|
Member Function Documentation
virtual const char* Zap::GameType::getGameTypeString |
( |
|
) |
[inline, virtual] |
|
virtual const char* Zap::GameType::getInstructionString |
( |
|
) |
[inline, virtual] |
|
virtual ClientRef* Zap::GameType::allocClientRef |
( |
|
) |
[inline, virtual] |
|
void Zap::GameType::addItemOfInterest |
( |
Item * |
theItem |
) |
|
|
void Zap::GameType::countTeamPlayers |
( |
|
) |
|
|
void Zap::GameType::processArguments |
( |
S32 |
argc, |
|
|
const char ** |
argv |
|
) |
[virtual] |
|
virtual bool Zap::GameType::processLevelItem |
( |
S32 |
argc, |
|
|
const char ** |
argv |
|
) |
[virtual] |
|
void Zap::GameType::onAddedToGame |
( |
Game * |
theGame |
) |
[virtual] |
|
void Zap::GameType::gameOverManGameOver |
( |
|
) |
|
|
virtual void Zap::GameType::onGameOver |
( |
|
) |
[virtual] |
|
virtual void Zap::GameType::serverAddClient |
( |
GameConnection * |
theClient |
) |
[virtual] |
|
virtual void Zap::GameType::serverRemoveClient |
( |
GameConnection * |
theClient |
) |
[virtual] |
|
virtual bool Zap::GameType::objectCanDamageObject |
( |
GameObject * |
damager, |
|
|
GameObject * |
victim |
|
) |
[virtual] |
|
virtual void Zap::GameType::spawnShip |
( |
GameConnection * |
theClient |
) |
[virtual] |
|
virtual void Zap::GameType::changeClientTeam |
( |
GameConnection * |
theClient |
) |
[virtual] |
|
virtual void Zap::GameType::renderInterfaceOverlay |
( |
bool |
scoreboardVisible |
) |
[virtual] |
|
void Zap::GameType::renderObjectiveArrow |
( |
GameObject * |
target, |
|
|
Color |
c, |
|
|
F32 |
alphaMod = 1.0f |
|
) |
|
|
void Zap::GameType::renderObjectiveArrow |
( |
Point |
p, |
|
|
Color |
c, |
|
|
F32 |
alphaMod = 1.0f |
|
) |
|
|
void Zap::GameType::renderTimeLeft |
( |
|
) |
|
|
void Zap::GameType::renderTalkingClients |
( |
|
) |
|
|
virtual void Zap::GameType::clientRequestLoadout |
( |
GameConnection * |
client, |
|
|
const Vector< U32 > & |
loadout |
|
) |
[virtual] |
|
virtual void Zap::GameType::updateShipLoadout |
( |
GameObject * |
shipObject |
) |
[virtual] |
|
void Zap::GameType::setClientShipLoadout |
( |
ClientRef * |
cl, |
|
|
const Vector< U32 > & |
loadout |
|
) |
|
|
virtual Color Zap::GameType::getShipColor |
( |
Ship * |
s |
) |
[virtual] |
|
Color Zap::GameType::getTeamColor |
( |
S32 |
team |
) |
|
|
virtual void Zap::GameType::addFlag |
( |
FlagItem * |
theFlag |
) |
[inline, virtual] |
|
virtual void Zap::GameType::flagDropped |
( |
Ship * |
theShip, |
|
|
FlagItem * |
theFlag |
|
) |
[inline, virtual] |
|
virtual void Zap::GameType::shipTouchFlag |
( |
Ship * |
theShip, |
|
|
FlagItem * |
theFlag |
|
) |
[inline, virtual] |
|
virtual void Zap::GameType::addZone |
( |
GoalZone * |
theZone |
) |
[inline, virtual] |
|
virtual void Zap::GameType::shipTouchZone |
( |
Ship * |
theShip, |
|
|
GoalZone * |
theZone |
|
) |
[inline, virtual] |
|
void Zap::GameType::queryItemsOfInterest |
( |
|
) |
|
|
void Zap::GameType::performScopeQuery |
( |
GhostConnection * |
connection |
) |
[virtual] |
|
|
For a scope object, determine what is in scope.
performScopeQuery is called on a NetConnection's scope object to determine which objects in the world are in scope for that connection.
Reimplemented from TNL::NetObject. |
void Zap::GameType::onGhostAvailable |
( |
GhostConnection * |
theConnection |
) |
[virtual] |
|
|
onGhostAvailable is called on the server side after the server knows that the ghost is available and addressable via the getGhostIndex().
Reimplemented from TNL::NetObject.
Reimplemented in Zap::HuntersGameType. |
Zap::GameType::TNL_DECLARE_RPC |
( |
s2cAddBarriers |
, |
|
|
(Vector< F32 > barrier, F32 width) |
|
|
) |
|
|
Zap::GameType::TNL_DECLARE_RPC |
( |
s2cAddClient |
, |
|
|
(StringTableEntry clientName, bool isMyClient) |
|
|
) |
|
|
Zap::GameType::TNL_DECLARE_RPC |
( |
s2cClientJoinedTeam |
, |
|
|
(StringTableEntry clientName, U32 teamIndex) |
|
|
) |
|
|
Zap::GameType::TNL_DECLARE_RPC |
( |
s2cSyncMessagesComplete |
, |
|
|
(U32 sequence) |
|
|
) |
|
|
Zap::GameType::TNL_DECLARE_RPC |
( |
c2sSyncMessagesComplete |
, |
|
|
(U32 sequence) |
|
|
) |
|
|
Zap::GameType::TNL_DECLARE_RPC |
( |
s2cSetGameOver |
, |
|
|
(bool gameOver) |
|
|
) |
|
|
Zap::GameType::TNL_DECLARE_RPC |
( |
s2cSetTimeRemaining |
, |
|
|
(U32 timeLeft) |
|
|
) |
|
|
Zap::GameType::TNL_DECLARE_RPC |
( |
s2cRemoveClient |
, |
|
|
(StringTableEntry clientName) |
|
|
) |
|
|
void Zap::GameType::setTeamScore |
( |
S32 |
teamIndex, |
|
|
S32 |
newScore |
|
) |
|
|
Zap::GameType::TNL_DECLARE_RPC |
( |
s2cSetTeamScore |
, |
|
|
(U32 teamIndex, U32 score) |
|
|
) |
|
|
Zap::GameType::TNL_DECLARE_RPC |
( |
c2sRequestScoreboardUpdates |
, |
|
|
(bool updates) |
|
|
) |
|
|
Zap::GameType::TNL_DECLARE_RPC |
( |
s2cScoreboardUpdate |
, |
|
|
(Vector< RangedU32< 0, MaxPing > > pingTimes, Vector< SignedInt< 24 > > scores) |
|
|
) |
|
|
virtual void Zap::GameType::updateClientScoreboard |
( |
ClientRef * |
theClient |
) |
[virtual] |
|
Zap::GameType::TNL_DECLARE_RPC |
( |
c2sAdvanceWeapon |
, |
|
|
() |
|
|
) |
|
|
virtual void Zap::GameType::addClientGameMenuOptions |
( |
Vector< MenuItem > & |
menuOptions |
) |
[virtual] |
|
virtual void Zap::GameType::processClientGameMenuOption |
( |
U32 |
index |
) |
[virtual] |
|
Zap::GameType::TNL_DECLARE_RPC |
( |
c2sChangeTeams |
, |
|
|
() |
|
|
) |
|
|
void Zap::GameType::sendChatDisplayEvent |
( |
ClientRef * |
cl, |
|
|
bool |
global, |
|
|
NetEvent * |
theEvent |
|
) |
|
|
Zap::GameType::TNL_DECLARE_RPC |
( |
c2sSendChat |
, |
|
|
(bool global, StringPtr message) |
|
|
) |
|
|
Zap::GameType::TNL_DECLARE_RPC |
( |
c2sSendChatSTE |
, |
|
|
(bool global, StringTableEntry ste) |
|
|
) |
|
|
Zap::GameType::TNL_DECLARE_RPC |
( |
c2sVoiceChat |
, |
|
|
(bool echo, ByteBufferPtr compressedVoice) |
|
|
) |
|
|
Zap::GameType::TNL_DECLARE_CLASS |
( |
GameType |
|
) |
|
|
Field Documentation
|
Static vector used for constructing update RPCs.
|
|