nVersionFeature Class Reference

#include <nNetwork.h>

List of all members.

Public Member Functions

 nVersionFeature (int min, int max=-1)
bool Supported ()
bool Supported (int client)

Private Attributes

int min_
int max_


Detailed Description

Definition at line 162 of file nNetwork.h.


Constructor & Destructor Documentation

nVersionFeature::nVersionFeature ( int  min,
int  max = -1 
)

Definition at line 342 of file nNetwork.cpp.

00345 {
00346     tASSERT( min_ >= sn_MyVersion().Min() );
00347     tASSERT( max < 0 || max <= sn_MyVersion().Max() );
00348 
00349     min_ = min;


Member Function Documentation

bool nVersionFeature::Supported (  ) 

Definition at line 351 of file nNetwork.cpp.

Referenced by gGame::Analysis(), gCycleMovement::ApplyAcceleration(), gCycleMovement::CalculateAcceleration(), gCycleMovement::CopyFrom(), gCycleMovement::GetMaxSpaceAhead(), MainMenu(), eVoteItem::ReBroadcast(), nServerLag::Report(), gCycle::RightBeforeDeath(), se_BroadcastChat(), se_BroadcastChatLine(), se_sendEventNotification(), se_SendPrivateMessage(), se_SendTeamMessage(), se_WantLogin(), sg_FullscreenMessage(), sg_GetSyncIntervalSelf(), sg_PlayerMenu(), sg_UseAntiLagSliding(), sn_Sync(), gCycleMovement::Timestep(), gCycleMovement::TimestepCore(), gCycle::TimestepCore(), ePlayerNetID::Update(), gCycle::WriteSync(), and eTimer::WriteSync().

00354 {

Here is the caller graph for this function:

bool nVersionFeature::Supported ( int  client  ) 

Definition at line 356 of file nNetwork.cpp.

00359 {
00360     if ( client < 0 || client > MAXCLIENTS )
00361         return false;
00362 
00363     // the version to check the feature for
00364     const nVersion * version = &sn_CurrentVersion();
00365 
00366     if ( sn_GetNetState() == nCLIENT )
00367     {
00368         // clientside code: override the currently active version with the server version ( if that has been sent )
00369         if ( sn_Connections[0].version.Max() > 0 )
00370             version = &sn_Connections[0].version;
00371     }
00372     else
00373     {
00374         // serverside code: override version to use with the client's version
00375         version = &sn_Connections[ client ].version;
00376     }
00377 
00378     // see if the feature is supported


Member Data Documentation

int nVersionFeature::min_ [private]

Definition at line 169 of file nNetwork.h.

int nVersionFeature::max_ [private]

Definition at line 169 of file nNetwork.h.


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:51:01 2008 for Armagetron Advanced by  doxygen 1.5.4