|
Public Types |
| BlockTypeMove = NetConnectionBlockTypeCount |
| GameConnectionBlockTypeCount |
| MaxConnectArgs = 16 |
| DataBlocksDone = NumConnectionMessages |
| DataBlocksDownloadDone |
enum | Constants {
BlockTypeMove = NetConnectionBlockTypeCount,
GameConnectionBlockTypeCount,
MaxConnectArgs = 16,
DataBlocksDone = NumConnectionMessages,
DataBlocksDownloadDone
} |
| Configuration. More...
|
Public Member Functions |
void | setConnectArgs (U32 argc, const char **argv) |
| Set connection arguments; these are passed to the server when we connect.
|
void | setJoinPassword (const char *password) |
| Set the server password to use when we join.
|
bool | canRemoteCreate () |
| DECLARE_CONOBJECT (GameConnection) |
void | handleConnectionMessage (U32 message, U32 sequence, U32 ghostCount) |
| Handle message from sendConnectionMessage().
|
void | preloadDataBlock (SimDataBlock *block) |
void | fileDownloadSegmentComplete () |
| Called when we finish downloading file data.
|
void | preloadNextDataBlock (bool hadNew) |
void | setDisconnectReason (const char *reason) |
| GameConnection () |
| ~GameConnection () |
U32 | getDataBlockSequence () |
void | setDataBlockSequence (U32 seq) |
bool | onAdd () |
| Called when the object is added to the sim.
|
void | onRemove () |
| Called when the object is removed from the sim.
|
void | detectLag () |
|
virtual void | onTimedOut () |
virtual void | onConnectTimedOut () |
virtual void | onDisconnect (const char *reason) |
virtual void | onConnectionRejected (const char *reason) |
virtual void | onConnectionEstablished (bool isInitiator) |
virtual void | handleStartupError (const char *errorString) |
|
virtual void | writeConnectRequest (BitStream *stream) |
virtual bool | readConnectRequest (BitStream *stream, const char **errorString) |
virtual void | writeConnectAccept (BitStream *stream) |
virtual bool | readConnectAccept (BitStream *stream, const char **errorString) |
|
void | setControlObject (GameBase *) |
GameBase * | getControlObject () |
void | setCameraObject (GameBase *) |
GameBase * | getCameraObject () |
bool | getControlCameraTransform (F32 dt, MatrixF *mat) |
bool | getControlCameraVelocity (Point3F *vel) |
bool | getControlCameraFov (F32 *fov) |
bool | setControlCameraFov (F32 fov) |
bool | isValidControlCameraFov (F32 fov) |
void | setFirstPerson (bool firstPerson) |
|
S32 | getDataBlockModifiedKey () |
void | setDataBlockModifiedKey (S32 key) |
S32 | getMaxDataBlockModifiedKey () |
void | setMaxDataBlockModifiedKey (S32 key) |
|
F32 | getDamageFlash () |
F32 | getWhiteOut () |
void | setBlackOut (bool fadeToBlack, S32 timeMS) |
F32 | getBlackOut () |
|
This is remnant code from Tribes 2.
|
void | setAuthInfo (const AuthInfo *info) |
const AuthInfo * | getAuthInfo () |
|
void | play2D (const SFXProfile *profile) |
void | play3D (const SFXProfile *profile, const MatrixF *transform) |
|
bool | isFirstPerson () |
bool | isAIControlled () |
void | doneScopingScene () |
| Called when we're done with normal scoping.
|
void | demoPlaybackComplete () |
void | setMissionCRC (U32 crc) |
U32 | getMissionCRC () |
Static Public Member Functions |
static void | consoleInit () |
| Register global constant variables and do other one-time initialization tasks in a subclass of ConsoleObject.
|
static GameConnection * | getConnectionToServer () |
static GameConnection * | getLocalClientConnection () |
Public Attributes |
MoveList | mMoveList |
Static Public Attributes |
static Signal< void(F32)> | smFovUpdate |
static Signal< void()> | smPlayingDemo |
|
Protocol versions are used to indicated changes in network traffic. These could be changes in how any object transmits or processes network information. You can specify backwards compatibility by specifying a MinRequireProtocolVersion. If the client protocol is >= this min value, the connection is accepted.
Torque (V12) SDK 1.0 uses protocol = 1
Torque SDK 1.1 uses protocol = 2 Torque SDK 1.4 uses protocol = 12
|
static const U32 | CurrentProtocolVersion |
static const U32 | MinRequiredProtocolVersion |
Protected Member Functions |
PacketNotify * | allocNotify () |
| Get a free Notify structure.
|
void | ghostWriteExtra (NetObject *, BitStream *) |
void | ghostReadExtra (NetObject *, BitStream *, bool newGhost) |
void | ghostPreRead (NetObject *, bool newGhost) |
|
void | readPacket (BitStream *bstream) |
void | writePacket (BitStream *bstream, PacketNotify *note) |
void | packetReceived (PacketNotify *note) |
void | packetDropped (PacketNotify *note) |
void | connectionError (const char *errorString) |
void | writeDemoStartBlock (ResizeBitStream *stream) |
bool | readDemoStartBlock (BitStream *stream) |
void | handleRecordedBlock (U32 type, U32 size, void *data) |
Protected Attributes |
bool | mControlForceMismatch |
Vector< SimDataBlock * > | mDataBlockLoadList |
bool | mAIControlled |
AuthInfo * | mAuthInfo |
S32 | mLastPacketTime |
bool | mLagging |
|
F32 | mDamageFlash |
| Note, these variables are not networked, they are for the local connection only.
|
F32 | mWhiteOut |
F32 | mBlackOut |
S32 | mBlackOutTimeMS |
S32 | mBlackOutStartTimeMS |
bool | mFadeToBlack |
Static Protected Attributes |
static S32 | mLagThresholdMS |
Private Types |
typedef NetConnection | Parent |
Private Attributes |
SimObjectPtr< GameBase > | mControlObject |
SimObjectPtr< GameBase > | mCameraObject |
U32 | mDataBlockSequence |
char | mDisconnectReason [256] |
U32 | mMissionCRC |
U32 | mLastControlRequestTime |
S32 | mDataBlockModifiedKey |
S32 | mMaxDataBlockModifiedKey |
|
bool | mFirstPerson |
| Are we currently first person or not.
|
bool | mUpdateFirstPerson |
| Set to notify client or server of first person change.
|
bool | mUpdateCameraFov |
| Set to notify server of camera FOV change.
|
F32 | mCameraFov |
| Current camera fov (in degrees).
|
F32 | mCameraPos |
| Current camera pos (0-1).
|
F32 | mCameraSpeed |
| Camera in/out speed.
|
|
This data is set with setConnectArgs() and setJoinPassword(), and sent across the wire when we connect.
|
U32 | mConnectArgc |
char * | mConnectArgv [MaxConnectArgs] |
char * | mJoinPassword |
Classes |
struct | GamePacketNotify |