PRooFPS-dd Dev Doc 1.0
PRooFPS-dd Developer Documentation
Loading...
Searching...
No Matches
proofps_dd::Config Class Reference

Detailed Description

Definition at line 81 of file Config.h.

#include <Config.h>

Public Member Functions

void validate ()
 
const unsigned int & getTickRate () const
 
const unsigned int & getPhysicsRate () const
 
const unsigned int & getClientUpdateRate () const
 
const float & getSomersaultMidAirJumpForceMultiplier () const
 
const unsigned int & getReconnectDelaySeconds () const
 
const bool & getCameraFollowsPlayerAndXHair () const
 
const bool & getCameraTilting () const
 
const bool & getCameraRolling () const
 
const int & getFallDamageMultiplier () const
 
const unsigned int & getPlayerRespawnDelaySeconds () const
 
const unsigned int & getPlayerRespawnInvulnerabilityDelaySeconds () const
 
bool clientHandleServerInfoFromServer (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const MsgServerInfoFromServer &msgServerInfo, proofps_dd::GameMode &gameMode)
 
void serverSaveServerInfo (const unsigned int &nMaxFps, const unsigned int &nTickrate, const unsigned int &nPhysicsRateMin, const unsigned int &nClientUpdateRate, const GameModeType &iGameModeType, const unsigned int &nFragLimit, const unsigned int &nTimeLimitSecs, const int &nFallDamageMultiplier, const unsigned int &nRespawnTimeSecs, const unsigned int &nRespawnInvulnerabilityTimeSec)
 
const MsgServerInfoFromServergetServerInfo () const
 
bool isServerInfoReceived () const
 
void setServerInfoNotReceived ()
 

Static Public Member Functions

static ConfiggetConfigInstance (PGE &pge, proofps_dd::Maps &maps)
 Gets the singleton instance.
 
static const char * getLoggerModuleName ()
 
static CConsole & getConsole ()
 

Private Member Functions

 Config (PGE &pge, proofps_dd::Maps &maps)
 
 ~Config ()
 
 Config (const Config &)=delete
 
Configoperator= (const Config &)=delete
 
 Config (Config &&)=delete
 
Config && operator= (Config &&)=delete
 

Private Attributes

PGE & m_pge
 
Mapsm_maps
 
unsigned int m_nTickrate = GAME_TICKRATE_DEF
 
unsigned int m_nPhysicsRateMin = GAME_PHYSICS_RATE_MIN_DEF
 
unsigned int m_nClientUpdateRate = GAME_CL_UPDATERATE_DEF
 
int m_nFragLimit = GameMode::nSvDmFragLimitDef
 
int m_nTimeLimitSecs = GameMode::nSvDmTimeLimitSecsDef
 
unsigned int m_nSecondsReconnectDelay = GAME_NETWORK_RECONNECT_SECONDS
 
float m_fSomersaultMidAirJumpForceMultiplier
 
int m_nFallDamageMultiplier = SV_FALL_DAMAGE_MULTIPLIER_DEF
 
bool m_bCamFollowsXHair = true
 
bool m_bCamTilting = true
 
bool m_bCamRolling = true
 
unsigned int m_nPlayerRespawnDelaySecs {}
 
unsigned int m_nPlayerRespawnInvulnerabilityDelaySecs {}
 
MsgServerInfoFromServer m_serverInfo {}
 Server and clients use this for informational purpose, to show it as debug info.
 
bool m_bServerInfoReceived = false
 Valid for clients only, since server does not send to itself.
 

Constructor & Destructor Documentation

◆ Config() [1/3]

proofps_dd::Config::Config ( PGE & pge,
proofps_dd::Maps & maps )
private

Definition at line 523 of file Config.cpp.

◆ ~Config()

proofps_dd::Config::~Config ( )
private

Definition at line 535 of file Config.cpp.

◆ Config() [2/3]

proofps_dd::Config::Config ( const Config & )
privatedelete

◆ Config() [3/3]

proofps_dd::Config::Config ( Config && )
privatedelete

Member Function Documentation

◆ clientHandleServerInfoFromServer()

bool proofps_dd::Config::clientHandleServerInfoFromServer ( pge_network::PgeNetworkConnectionHandle connHandleServerSide,
const MsgServerInfoFromServer & msgServerInfo,
proofps_dd::GameMode & gameMode )

Definition at line 402 of file Config.cpp.

◆ getCameraFollowsPlayerAndXHair()

const bool & proofps_dd::Config::getCameraFollowsPlayerAndXHair ( ) const

Definition at line 372 of file Config.cpp.

◆ getCameraRolling()

const bool & proofps_dd::Config::getCameraRolling ( ) const

Definition at line 382 of file Config.cpp.

◆ getCameraTilting()

const bool & proofps_dd::Config::getCameraTilting ( ) const

Definition at line 377 of file Config.cpp.

◆ getClientUpdateRate()

const unsigned int & proofps_dd::Config::getClientUpdateRate ( ) const

Definition at line 357 of file Config.cpp.

◆ getConfigInstance()

proofps_dd::Config & proofps_dd::Config::getConfigInstance ( PGE & pge,
proofps_dd::Maps & maps )
static

Gets the singleton instance.

Definition at line 24 of file Config.cpp.

◆ getConsole()

CConsole & proofps_dd::Config::getConsole ( )
static

Definition at line 39 of file Config.cpp.

◆ getFallDamageMultiplier()

const int & proofps_dd::Config::getFallDamageMultiplier ( ) const

Definition at line 387 of file Config.cpp.

◆ getLoggerModuleName()

const char * proofps_dd::Config::getLoggerModuleName ( )
static

Definition at line 34 of file Config.cpp.

◆ getPhysicsRate()

const unsigned int & proofps_dd::Config::getPhysicsRate ( ) const

Definition at line 352 of file Config.cpp.

◆ getPlayerRespawnDelaySeconds()

const unsigned int & proofps_dd::Config::getPlayerRespawnDelaySeconds ( ) const

Definition at line 392 of file Config.cpp.

◆ getPlayerRespawnInvulnerabilityDelaySeconds()

const unsigned int & proofps_dd::Config::getPlayerRespawnInvulnerabilityDelaySeconds ( ) const

Definition at line 397 of file Config.cpp.

◆ getReconnectDelaySeconds()

const unsigned int & proofps_dd::Config::getReconnectDelaySeconds ( ) const

Definition at line 367 of file Config.cpp.

◆ getServerInfo()

const proofps_dd::MsgServerInfoFromServer & proofps_dd::Config::getServerInfo ( ) const

Definition at line 501 of file Config.cpp.

◆ getSomersaultMidAirJumpForceMultiplier()

const float & proofps_dd::Config::getSomersaultMidAirJumpForceMultiplier ( ) const

Definition at line 362 of file Config.cpp.

◆ getTickRate()

const unsigned int & proofps_dd::Config::getTickRate ( ) const

Definition at line 347 of file Config.cpp.

◆ isServerInfoReceived()

bool proofps_dd::Config::isServerInfoReceived ( ) const

Definition at line 506 of file Config.cpp.

◆ operator=() [1/2]

Config && proofps_dd::Config::operator= ( Config && )
privatedelete

◆ operator=() [2/2]

Config & proofps_dd::Config::operator= ( const Config & )
privatedelete

◆ serverSaveServerInfo()

void proofps_dd::Config::serverSaveServerInfo ( const unsigned int & nMaxFps,
const unsigned int & nTickrate,
const unsigned int & nPhysicsRateMin,
const unsigned int & nClientUpdateRate,
const GameModeType & iGameModeType,
const unsigned int & nFragLimit,
const unsigned int & nTimeLimitSecs,
const int & nFallDamageMultiplier,
const unsigned int & nRespawnTimeSecs,
const unsigned int & nRespawnInvulnerabilityTimeSec )

Definition at line 456 of file Config.cpp.

◆ setServerInfoNotReceived()

void proofps_dd::Config::setServerInfoNotReceived ( )

Definition at line 511 of file Config.cpp.

◆ validate()

void proofps_dd::Config::validate ( )

Definition at line 44 of file Config.cpp.

Member Data Documentation

◆ m_bCamFollowsXHair

bool proofps_dd::Config::m_bCamFollowsXHair = true
private

Definition at line 153 of file Config.h.

◆ m_bCamRolling

bool proofps_dd::Config::m_bCamRolling = true
private

Definition at line 155 of file Config.h.

◆ m_bCamTilting

bool proofps_dd::Config::m_bCamTilting = true
private

Definition at line 154 of file Config.h.

◆ m_bServerInfoReceived

bool proofps_dd::Config::m_bServerInfoReceived = false
private

Valid for clients only, since server does not send to itself.

Definition at line 168 of file Config.h.

◆ m_fSomersaultMidAirJumpForceMultiplier

float proofps_dd::Config::m_fSomersaultMidAirJumpForceMultiplier
private

Definition at line 149 of file Config.h.

◆ m_maps

Maps& proofps_dd::Config::m_maps
private

Definition at line 138 of file Config.h.

◆ m_nClientUpdateRate

unsigned int proofps_dd::Config::m_nClientUpdateRate = GAME_CL_UPDATERATE_DEF
private

Definition at line 142 of file Config.h.

◆ m_nFallDamageMultiplier

int proofps_dd::Config::m_nFallDamageMultiplier = SV_FALL_DAMAGE_MULTIPLIER_DEF
private

Definition at line 151 of file Config.h.

◆ m_nFragLimit

int proofps_dd::Config::m_nFragLimit = GameMode::nSvDmFragLimitDef
private

Definition at line 144 of file Config.h.

◆ m_nPhysicsRateMin

unsigned int proofps_dd::Config::m_nPhysicsRateMin = GAME_PHYSICS_RATE_MIN_DEF
private

Definition at line 141 of file Config.h.

◆ m_nPlayerRespawnDelaySecs

unsigned int proofps_dd::Config::m_nPlayerRespawnDelaySecs {}
private

Definition at line 157 of file Config.h.

◆ m_nPlayerRespawnInvulnerabilityDelaySecs

unsigned int proofps_dd::Config::m_nPlayerRespawnInvulnerabilityDelaySecs {}
private

Definition at line 158 of file Config.h.

◆ m_nSecondsReconnectDelay

unsigned int proofps_dd::Config::m_nSecondsReconnectDelay = GAME_NETWORK_RECONNECT_SECONDS
private

Definition at line 147 of file Config.h.

◆ m_nTickrate

unsigned int proofps_dd::Config::m_nTickrate = GAME_TICKRATE_DEF
private

Definition at line 140 of file Config.h.

◆ m_nTimeLimitSecs

int proofps_dd::Config::m_nTimeLimitSecs = GameMode::nSvDmTimeLimitSecsDef
private

Definition at line 145 of file Config.h.

◆ m_pge

PGE& proofps_dd::Config::m_pge
private

Definition at line 137 of file Config.h.

◆ m_serverInfo

MsgServerInfoFromServer proofps_dd::Config::m_serverInfo {}
private

Server and clients use this for informational purpose, to show it as debug info.

Actually, clients also use it for other purpose too, e.g. to know the respawn time so they draw countdown progress bar based on that! Seems to be redundant as we could also store these in above members, but for now we keep them separate. Maybe in the future the only member here will be this, so server will immediately store its config here, and just pass this member when sending out message to clients, and clients also need only this. Only clients use all members, server use almost all members, except irrelevant ones, e.g.: m_nTimeRemainingMillisecs.

Definition at line 167 of file Config.h.


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