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

Detailed Description

Definition at line 85 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 bool & getFriendlyFire () const
 
const Smoke::SmokeConfigAmountgetSmokeConfigAmount () const
 
const int & getFallDamageMultiplier () const
 
const unsigned int & getPlayerRespawnDelaySeconds () const
 
const unsigned int & getPlayerRespawnInvulnerabilityDelaySeconds () const
 
bool clientHandleServerInfoFromServer (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const MsgServerInfoFromServer &msgServerInfo, const std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > &mapPlayers)
 
bool serverSendServerInfo (pge_network::PgeNetworkConnectionHandle connHandleServerSide)
 
void serverSaveServerInfo (const unsigned int &nMaxFps, const unsigned int &nTickrate, const unsigned int &nPhysicsRateMin, const unsigned int &nClientUpdateRate, const GameModeType &iGameModeType, const unsigned int &nScoreLimit, const unsigned int &nTimeLimitSecs, const int &nFallDamageMultiplier, const unsigned int &nRespawnTimeSecs, const unsigned int &nRespawnInvulnerabilityTimeSec, const bool &bFriendlyFire)
 
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::nSvGmTimeLimitSecsDef
 
int m_nRoundWinLimit = GameMode::nSvRgmRoundWinLimitDef
 
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
 
bool m_bFriendlyFire = true
 
Smoke::SmokeConfigAmount m_eSmokeAmount = Smoke::SmokeConfigAmount::Normal
 
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 742 of file Config.cpp.

◆ ~Config()

proofps_dd::Config::~Config ( )
private

Definition at line 754 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,
const std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > & mapPlayers )

Definition at line 504 of file Config.cpp.

◆ getCameraFollowsPlayerAndXHair()

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

Definition at line 464 of file Config.cpp.

◆ getCameraRolling()

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

Definition at line 474 of file Config.cpp.

◆ getCameraTilting()

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

Definition at line 469 of file Config.cpp.

◆ getClientUpdateRate()

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

Definition at line 449 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 489 of file Config.cpp.

◆ getFriendlyFire()

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

Definition at line 479 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 444 of file Config.cpp.

◆ getPlayerRespawnDelaySeconds()

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

Definition at line 494 of file Config.cpp.

◆ getPlayerRespawnInvulnerabilityDelaySeconds()

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

Definition at line 499 of file Config.cpp.

◆ getReconnectDelaySeconds()

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

Definition at line 459 of file Config.cpp.

◆ getServerInfo()

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

Definition at line 720 of file Config.cpp.

◆ getSmokeConfigAmount()

const proofps_dd::Smoke::SmokeConfigAmount & proofps_dd::Config::getSmokeConfigAmount ( ) const

Definition at line 484 of file Config.cpp.

◆ getSomersaultMidAirJumpForceMultiplier()

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

Definition at line 454 of file Config.cpp.

◆ getTickRate()

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

Definition at line 439 of file Config.cpp.

◆ isServerInfoReceived()

bool proofps_dd::Config::isServerInfoReceived ( ) const

Definition at line 725 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 & nScoreLimit,
const unsigned int & nTimeLimitSecs,
const int & nFallDamageMultiplier,
const unsigned int & nRespawnTimeSecs,
const unsigned int & nRespawnInvulnerabilityTimeSec,
const bool & bFriendlyFire )

Definition at line 659 of file Config.cpp.

◆ serverSendServerInfo()

bool proofps_dd::Config::serverSendServerInfo ( pge_network::PgeNetworkConnectionHandle connHandleServerSide)

Definition at line 603 of file Config.cpp.

◆ setServerInfoNotReceived()

void proofps_dd::Config::setServerInfoNotReceived ( )

Definition at line 730 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 165 of file Config.h.

◆ m_bCamRolling

bool proofps_dd::Config::m_bCamRolling = true
private

Definition at line 167 of file Config.h.

◆ m_bCamTilting

bool proofps_dd::Config::m_bCamTilting = true
private

Definition at line 166 of file Config.h.

◆ m_bFriendlyFire

bool proofps_dd::Config::m_bFriendlyFire = true
private

Definition at line 169 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 184 of file Config.h.

◆ m_eSmokeAmount

Smoke::SmokeConfigAmount proofps_dd::Config::m_eSmokeAmount = Smoke::SmokeConfigAmount::Normal
private

Definition at line 171 of file Config.h.

◆ m_fSomersaultMidAirJumpForceMultiplier

float proofps_dd::Config::m_fSomersaultMidAirJumpForceMultiplier
private

Definition at line 161 of file Config.h.

◆ m_maps

Maps& proofps_dd::Config::m_maps
private

Definition at line 149 of file Config.h.

◆ m_nClientUpdateRate

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

Definition at line 153 of file Config.h.

◆ m_nFallDamageMultiplier

int proofps_dd::Config::m_nFallDamageMultiplier = SV_FALL_DAMAGE_MULTIPLIER_DEF
private

Definition at line 163 of file Config.h.

◆ m_nFragLimit

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

Definition at line 155 of file Config.h.

◆ m_nPhysicsRateMin

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

Definition at line 152 of file Config.h.

◆ m_nPlayerRespawnDelaySecs

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

Definition at line 173 of file Config.h.

◆ m_nPlayerRespawnInvulnerabilityDelaySecs

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

Definition at line 174 of file Config.h.

◆ m_nRoundWinLimit

int proofps_dd::Config::m_nRoundWinLimit = GameMode::nSvRgmRoundWinLimitDef
private

Definition at line 157 of file Config.h.

◆ m_nSecondsReconnectDelay

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

Definition at line 159 of file Config.h.

◆ m_nTickrate

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

Definition at line 151 of file Config.h.

◆ m_nTimeLimitSecs

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

Definition at line 156 of file Config.h.

◆ m_pge

PGE& proofps_dd::Config::m_pge
private

Definition at line 148 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 183 of file Config.h.


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