OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4GameControlClient Class Reference

#include <C4GameControlNetwork.h>

Collaboration diagram for C4GameControlClient:
[legend]

Public Member Functions

 C4GameControlClient ()
 
int32_t getClientID () const
 
const char * getName () const
 
int32_t getNextControl () const
 
int32_t getPerfStat () const
 
void Set (int32_t iClientID, const char *szName)
 
void SetNextControl (int32_t inNextControl)
 
void AddPerf (int32_t iTime)
 

Protected Attributes

int32_t iClientID
 
char szName [C4MaxName+1]
 
int32_t iNextControl
 
int32_t iPerformance
 
C4GameControlClientpNext
 

Friends

class C4GameControlNetwork
 

Detailed Description

Definition at line 206 of file C4GameControlNetwork.h.

Constructor & Destructor Documentation

C4GameControlClient::C4GameControlClient ( )

Definition at line 902 of file C4GameControlNetwork.cpp.

References szName.

904 {
905  szName[0] = '\0';
906 }
const int32_t C4ClientIDUnknown
Definition: C4Client.h:24
char szName[C4MaxName+1]

Member Function Documentation

void C4GameControlClient::AddPerf ( int32_t  iTime)

Definition at line 919 of file C4GameControlNetwork.cpp.

References iPerformance.

920 {
921  iPerformance += (iTime * 100 - iPerformance) / 100;
922 }
int32_t C4GameControlClient::getClientID ( ) const
inline

Definition at line 227 of file C4GameControlNetwork.h.

References iClientID.

Referenced by C4GameControlNetwork::AddClient(), and C4GameControlNetwork::PackCompleteCtrl().

227 { return iClientID; }

Here is the caller graph for this function:

const char* C4GameControlClient::getName ( ) const
inline

Definition at line 228 of file C4GameControlNetwork.h.

References szName.

228 { return szName; }
char szName[C4MaxName+1]
int32_t C4GameControlClient::getNextControl ( ) const
inline

Definition at line 229 of file C4GameControlNetwork.h.

References iNextControl.

Referenced by C4GameControlNetwork::ClientNextControl(), and C4GameControlNetwork::PackCompleteCtrl().

229 { return iNextControl; }

Here is the caller graph for this function:

int32_t C4GameControlClient::getPerfStat ( ) const

Definition at line 908 of file C4GameControlNetwork.cpp.

References iPerformance.

Referenced by C4GameControlNetwork::ClientPerfStat().

909 {
910  return iPerformance / 100;
911 }

Here is the caller graph for this function:

void C4GameControlClient::Set ( int32_t  iClientID,
const char *  szName 
)

Definition at line 913 of file C4GameControlNetwork.cpp.

References iClientID, SCopy(), and szName.

Referenced by C4GameControlNetwork::AddClient().

914 {
915  iClientID = inClientID;
916  SCopy(sznName, szName, sizeof(szName)-1);
917 }
void SCopy(const char *szSource, char *sTarget, size_t iMaxL)
Definition: Standard.cpp:122
char szName[C4MaxName+1]

Here is the call graph for this function:

Here is the caller graph for this function:

void C4GameControlClient::SetNextControl ( int32_t  inNextControl)
inline

Definition at line 233 of file C4GameControlNetwork.h.

Referenced by C4GameControlNetwork::AddClient(), and C4GameControlNetwork::PackCompleteCtrl().

233 { iNextControl = inNextControl; }

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class C4GameControlNetwork
friend

Definition at line 208 of file C4GameControlNetwork.h.

Member Data Documentation

int32_t C4GameControlClient::iClientID
protected

Definition at line 214 of file C4GameControlNetwork.h.

Referenced by getClientID(), and Set().

int32_t C4GameControlClient::iNextControl
protected

Definition at line 218 of file C4GameControlNetwork.h.

Referenced by getNextControl().

int32_t C4GameControlClient::iPerformance
protected

Definition at line 221 of file C4GameControlNetwork.h.

Referenced by AddPerf(), and getPerfStat().

char C4GameControlClient::szName[C4MaxName+1]
protected

Definition at line 215 of file C4GameControlNetwork.h.

Referenced by C4GameControlClient(), getName(), and Set().


The documentation for this class was generated from the following files: