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

Detailed Description

Definition at line 37 of file PlayerHandling.h.

#include <PlayerHandling.h>

+ Inheritance diagram for proofps_dd::PlayerHandling:

Public Member Functions

CConsole & getConsole () const
 
 PlayerHandling (PGE &pge, proofps_dd::Durations &durations, proofps_dd::GUI &gui, std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > &mapPlayers, proofps_dd::Maps &maps, proofps_dd::Sounds &sounds)
 
 PlayerHandling (const PlayerHandling &)=delete
 
PlayerHandlingoperator= (const PlayerHandling &)=delete
 
 PlayerHandling (PlayerHandling &&)=delete
 
PlayerHandling && operator= (PlayerHandling &&)=delete
 

Static Public Member Functions

static const char * getLoggerModuleName ()
 

Protected Member Functions

void handlePlayerDied (Player &player, XHair &xhair, const pge_network::PgeNetworkConnectionHandle &nKillerConnHandleServerSide, proofps_dd::GameMode &gameMode)
 
void handlePlayerRespawned (Player &player, XHair &xhair)
 
void serverRespawnPlayer (Player &player, bool restartGame, const proofps_dd::Config &config)
 
void serverUpdateRespawnTimers (const proofps_dd::Config &config, proofps_dd::GameMode &gameMode, proofps_dd::Durations &durations)
 
void updatePlayersOldValues ()
 
void writePlayerList ()
 
bool handleUserConnected (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const pge_network::MsgUserConnectedServerSelf &msg, PGEcfgProfiles &cfgProfiles, proofps_dd::Config &config, proofps_dd::GameMode &gameMode, std::function< void(int)> &cbDisplayMapLoadingProgressUpdate)
 
bool handleUserDisconnected (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const pge_network::MsgUserDisconnectedFromServer &msg, proofps_dd::GameMode &gameMode)
 
bool handleUserNameChange (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const proofps_dd::MsgUserNameChangeAndBootupDone &msg, proofps_dd::Config &config, proofps_dd::GameMode &gameMode, PGEcfgProfiles &cfgProfiles)
 
void resetSendClientUpdatesCounter (proofps_dd::Config &config)
 
void serverSendUserUpdates (PGEcfgProfiles &cfgProfiles, proofps_dd::Config &config, proofps_dd::Durations &durations, proofps_dd::GameMode &gameMode)
 
bool handleUserUpdateFromServer (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const proofps_dd::MsgUserUpdateFromServer &msg, XHair &xhair, const proofps_dd::Config &config, proofps_dd::GameMode &gameMode)
 
bool handleDeathNotificationFromServer (pge_network::PgeNetworkConnectionHandle nDeadConnHandleServerSide, const proofps_dd::MsgDeathNotificationFromServer &msg)
 
bool handlePlayerEventFromServer (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const proofps_dd::MsgPlayerEventFromServer &msg)
 
void updatePlayersVisuals (const proofps_dd::Config &config, proofps_dd::GameMode &gameMode)
 
- Protected Member Functions inherited from proofps_dd::Networking
void allowListAppMessages ()
 
 Networking (PGE &pge, proofps_dd::Durations &durations)
 
 Networking (const Networking &)=delete
 
Networkingoperator= (const Networking &)=delete
 
 Networking (Networking &&)=delete
 
Networking && operator= (Networking &&)=delete
 
CConsole & getConsole () const
 
bool isMyConnection (const pge_network::PgeNetworkConnectionHandle &connHandleServerSide) const
 
const pge_network::PgeNetworkConnectionHandle & getMyServerSideConnectionHandle () const
 
bool reinitializeNetworking ()
 
bool isServer () const
 

Private Attributes

PGE & m_pge
 
proofps_dd::GUIm_gui
 
std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > & m_mapPlayers
 
proofps_dd::Mapsm_maps
 
proofps_dd::Soundsm_sounds
 
unsigned int m_nSendClientUpdatesInEveryNthTick = 1
 
unsigned int m_nSendClientUpdatesCntr = m_nSendClientUpdatesInEveryNthTick
 

Additional Inherited Members

- Static Protected Member Functions inherited from proofps_dd::Networking
static const char * getLoggerModuleName ()
 
- Protected Attributes inherited from proofps_dd::Networking
pge_network::PgeNetworkConnectionHandle m_nServerSideConnectionHandle
 Server-side connection handle received from server in PgePktUserConnected (server instance also receives this from itself).
 
- Static Protected Attributes inherited from proofps_dd::Networking
static constexpr char * szCVarClServerIp = "cl_server_ip"
 

Constructor & Destructor Documentation

◆ PlayerHandling() [1/3]

proofps_dd::PlayerHandling::PlayerHandling ( PGE & pge,
proofps_dd::Durations & durations,
proofps_dd::GUI & gui,
std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > & mapPlayers,
proofps_dd::Maps & maps,
proofps_dd::Sounds & sounds )

Definition at line 25 of file PlayerHandling.cpp.

◆ PlayerHandling() [2/3]

proofps_dd::PlayerHandling::PlayerHandling ( const PlayerHandling & )
delete

◆ PlayerHandling() [3/3]

proofps_dd::PlayerHandling::PlayerHandling ( PlayerHandling && )
delete

Member Function Documentation

◆ getConsole()

CConsole & proofps_dd::PlayerHandling::getConsole ( ) const

Definition at line 49 of file PlayerHandling.cpp.

◆ getLoggerModuleName()

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

Definition at line 20 of file PlayerHandling.cpp.

◆ handleDeathNotificationFromServer()

bool proofps_dd::PlayerHandling::handleDeathNotificationFromServer ( pge_network::PgeNetworkConnectionHandle nDeadConnHandleServerSide,
const proofps_dd::MsgDeathNotificationFromServer & msg )
protected

Definition at line 965 of file PlayerHandling.cpp.

◆ handlePlayerDied()

void proofps_dd::PlayerHandling::handlePlayerDied ( Player & player,
XHair & xhair,
const pge_network::PgeNetworkConnectionHandle & nKillerConnHandleServerSide,
proofps_dd::GameMode & gameMode )
protected

Definition at line 58 of file PlayerHandling.cpp.

◆ handlePlayerEventFromServer()

bool proofps_dd::PlayerHandling::handlePlayerEventFromServer ( pge_network::PgeNetworkConnectionHandle connHandleServerSide,
const proofps_dd::MsgPlayerEventFromServer & msg )
protected

Definition at line 1018 of file PlayerHandling.cpp.

◆ handlePlayerRespawned()

void proofps_dd::PlayerHandling::handlePlayerRespawned ( Player & player,
XHair & xhair )
protected

Definition at line 116 of file PlayerHandling.cpp.

◆ handleUserConnected()

bool proofps_dd::PlayerHandling::handleUserConnected ( pge_network::PgeNetworkConnectionHandle connHandleServerSide,
const pge_network::MsgUserConnectedServerSelf & msg,
PGEcfgProfiles & cfgProfiles,
proofps_dd::Config & config,
proofps_dd::GameMode & gameMode,
std::function< void(int)> & cbDisplayMapLoadingProgressUpdate )
protected

Definition at line 216 of file PlayerHandling.cpp.

◆ handleUserDisconnected()

bool proofps_dd::PlayerHandling::handleUserDisconnected ( pge_network::PgeNetworkConnectionHandle connHandleServerSide,
const pge_network::MsgUserDisconnectedFromServer & msg,
proofps_dd::GameMode & gameMode )
protected

Definition at line 367 of file PlayerHandling.cpp.

◆ handleUserNameChange()

bool proofps_dd::PlayerHandling::handleUserNameChange ( pge_network::PgeNetworkConnectionHandle connHandleServerSide,
const proofps_dd::MsgUserNameChangeAndBootupDone & msg,
proofps_dd::Config & config,
proofps_dd::GameMode & gameMode,
PGEcfgProfiles & cfgProfiles )
protected

Definition at line 437 of file PlayerHandling.cpp.

◆ handleUserUpdateFromServer()

bool proofps_dd::PlayerHandling::handleUserUpdateFromServer ( pge_network::PgeNetworkConnectionHandle connHandleServerSide,
const proofps_dd::MsgUserUpdateFromServer & msg,
XHair & xhair,
const proofps_dd::Config & config,
proofps_dd::GameMode & gameMode )
protected

Definition at line 770 of file PlayerHandling.cpp.

◆ operator=() [1/2]

PlayerHandling & proofps_dd::PlayerHandling::operator= ( const PlayerHandling & )
delete

◆ operator=() [2/2]

PlayerHandling && proofps_dd::PlayerHandling::operator= ( PlayerHandling && )
delete

◆ resetSendClientUpdatesCounter()

void proofps_dd::PlayerHandling::resetSendClientUpdatesCounter ( proofps_dd::Config & config)
protected

Definition at line 643 of file PlayerHandling.cpp.

◆ serverRespawnPlayer()

void proofps_dd::PlayerHandling::serverRespawnPlayer ( Player & player,
bool restartGame,
const proofps_dd::Config & config )
protected

Definition at line 145 of file PlayerHandling.cpp.

◆ serverSendUserUpdates()

void proofps_dd::PlayerHandling::serverSendUserUpdates ( PGEcfgProfiles & cfgProfiles,
proofps_dd::Config & config,
proofps_dd::Durations & durations,
proofps_dd::GameMode & gameMode )
protected

Definition at line 650 of file PlayerHandling.cpp.

◆ serverUpdateRespawnTimers()

void proofps_dd::PlayerHandling::serverUpdateRespawnTimers ( const proofps_dd::Config & config,
proofps_dd::GameMode & gameMode,
proofps_dd::Durations & durations )
protected

Definition at line 159 of file PlayerHandling.cpp.

◆ updatePlayersOldValues()

void proofps_dd::PlayerHandling::updatePlayersOldValues ( )
protected

Definition at line 192 of file PlayerHandling.cpp.

◆ updatePlayersVisuals()

void proofps_dd::PlayerHandling::updatePlayersVisuals ( const proofps_dd::Config & config,
proofps_dd::GameMode & gameMode )
protected

Definition at line 1074 of file PlayerHandling.cpp.

◆ writePlayerList()

void proofps_dd::PlayerHandling::writePlayerList ( )
protected

Definition at line 205 of file PlayerHandling.cpp.

Member Data Documentation

◆ m_gui

proofps_dd::GUI& proofps_dd::PlayerHandling::m_gui
private

Definition at line 121 of file PlayerHandling.h.

◆ m_mapPlayers

std::map<pge_network::PgeNetworkConnectionHandle, proofps_dd::Player>& proofps_dd::PlayerHandling::m_mapPlayers
private

Definition at line 122 of file PlayerHandling.h.

◆ m_maps

proofps_dd::Maps& proofps_dd::PlayerHandling::m_maps
private

Definition at line 123 of file PlayerHandling.h.

◆ m_nSendClientUpdatesCntr

unsigned int proofps_dd::PlayerHandling::m_nSendClientUpdatesCntr = m_nSendClientUpdatesInEveryNthTick
private

Definition at line 127 of file PlayerHandling.h.

◆ m_nSendClientUpdatesInEveryNthTick

unsigned int proofps_dd::PlayerHandling::m_nSendClientUpdatesInEveryNthTick = 1
private

Definition at line 126 of file PlayerHandling.h.

◆ m_pge

PGE& proofps_dd::PlayerHandling::m_pge
private

Definition at line 120 of file PlayerHandling.h.

◆ m_sounds

proofps_dd::Sounds& proofps_dd::PlayerHandling::m_sounds
private

Definition at line 124 of file PlayerHandling.h.


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