![]() |
PRooFPS-dd Dev Doc 1.0
PRooFPS-dd Developer Documentation
|
Definition at line 38 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, proofps_dd::CameraHandling &camera) | |
| PlayerHandling (const PlayerHandling &)=delete | |
| PlayerHandling & | operator= (const PlayerHandling &)=delete |
| PlayerHandling (PlayerHandling &&)=delete | |
| PlayerHandling && | operator= (PlayerHandling &&)=delete |
Static Public Member Functions | |
| static const char * | getLoggerModuleName () |
Protected Member Functions | |
| bool | hasPlayerBootedUp (const pge_network::PgeNetworkConnectionHandle &connHandle) const |
| void | handlePlayerDied (Player &player, XHair &xhair, const pge_network::PgeNetworkConnectionHandle &nKillerConnHandleServerSide) |
| void | handlePlayerRespawned (Player &player, XHair &xhair) |
| void | serverRespawnPlayer (Player &player, const proofps_dd::GameRestartType_KeepPlayers &eRestartType, const proofps_dd::Config &config, PGEcfgProfiles &cfgProfiles) |
| Respawn is required when either a game is started, restarted, or a dead player needs to be revived. | |
| void | serverResettlePlayer (Player &player, const proofps_dd::Config &config) |
| Resettle is required when a round-based game starts a new round, and we need to reposition alive players back to spawn points. | |
| void | serverUpdateRespawnTimers (const proofps_dd::Config &config, PGEcfgProfiles &cfgProfiles, proofps_dd::GameMode &gameMode, proofps_dd::Durations &durations) |
| void | handlePlayerTeamIdChangedOrToggledSpectatorMode (Player &player, const unsigned int &iTeamId, const bool &bToggledSpectatorMode, const proofps_dd::Config &config, PGEcfgProfiles &cfgProfiles) |
| void | handleExplosionMultiKill (int nPlayersDiedByExplosion) |
| void | writePlayerList () |
| bool | handleUserConnected (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const pge_network::MsgUserConnectedServerSelf &msg, PGEcfgProfiles &cfgProfiles, proofps_dd::Config &config, 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, PGEcfgProfiles &cfgProfiles) |
| void | resetSendClientUpdatesCounter (proofps_dd::Config &config) |
| void | serverUpdatePlayersOldValues (proofps_dd::Config &config, PgeObjectPool< proofps_dd::Smoke > &smokes) |
| 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, PgeObjectPool< proofps_dd::Smoke > &smokes) |
| bool | handleDeathNotificationFromServer (pge_network::PgeNetworkConnectionHandle nDeadConnHandleServerSide, const proofps_dd::MsgDeathNotificationFromServer &msg, proofps_dd::GameMode &gameMode) |
| bool | handlePlayerEventFromServer (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const proofps_dd::MsgPlayerEventFromServer &msg, PureVector &vecCamShakeForce, const proofps_dd::Config &config, PGEcfgProfiles &cfgProfiles) |
| bool | serverHandleUserInGameMenuCmd (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const proofps_dd::MsgUserInGameMenuCmd &msg, const proofps_dd::Config &config, PGEcfgProfiles &cfgProfiles) |
| void | updatePlayersVisuals (const proofps_dd::Config &config, proofps_dd::GameMode &gameMode) |
| Invoked in every frame by all instances. | |
Protected Member Functions inherited from proofps_dd::Networking | |
| void | allowListAppMessages () |
| Networking (PGE &pge, proofps_dd::Durations &durations) | |
| Networking (const Networking &)=delete | |
| Networking & | operator= (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::GUI & | m_gui |
| std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > & | m_mapPlayers |
| proofps_dd::Maps & | m_maps |
| proofps_dd::Sounds & | m_sounds |
| proofps_dd::CameraHandling & | m_camera |
| 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" |
| 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, | ||
| proofps_dd::CameraHandling & | camera ) |
Definition at line 25 of file PlayerHandling.cpp.
|
delete |
|
delete |
| CConsole & proofps_dd::PlayerHandling::getConsole | ( | ) | const |
Definition at line 51 of file PlayerHandling.cpp.
|
static |
Definition at line 20 of file PlayerHandling.cpp.
|
protected |
Definition at line 1418 of file PlayerHandling.cpp.
|
protected |
Definition at line 508 of file PlayerHandling.cpp.
|
protected |
Definition at line 71 of file PlayerHandling.cpp.
|
protected |
Definition at line 1483 of file PlayerHandling.cpp.
Definition at line 145 of file PlayerHandling.cpp.
|
protected |
Definition at line 295 of file PlayerHandling.cpp.
|
protected |
Definition at line 533 of file PlayerHandling.cpp.
|
protected |
Definition at line 714 of file PlayerHandling.cpp.
|
protected |
Definition at line 795 of file PlayerHandling.cpp.
|
protected |
Definition at line 1158 of file PlayerHandling.cpp.
|
protected |
Definition at line 60 of file PlayerHandling.cpp.
|
delete |
|
delete |
|
protected |
Definition at line 1008 of file PlayerHandling.cpp.
|
protected |
Definition at line 1564 of file PlayerHandling.cpp.
|
protected |
Resettle is required when a round-based game starts a new round, and we need to reposition alive players back to spawn points.
Their HP will be defaulted as well to 100. Player's AP, items and weapons are not touched, so these are carried over to next round.
Shall not be invoked for dead players: dead players shall be respawned, not resettled. Shall not be invoked for players in spectator mode: they must toggle their spectator mode state manually to trigger respawn.
| player | The player to be resettled. |
| config | The usual Config instance. |
Definition at line 229 of file PlayerHandling.cpp.
|
protected |
Respawn is required when either a game is started, restarted, or a dead player needs to be revived.
The player can be either dead or alive, doesn't matter. Player's HP and AP will be reset to defaults, also items and weapons.
| player | The player to be respawned. |
| eRestartType | Depending on restart type, player's stats and other stuff will be defaulted as well. |
| config | The usual Config instance. |
Definition at line 175 of file PlayerHandling.cpp.
|
protected |
Definition at line 1032 of file PlayerHandling.cpp.
|
protected |
Definition at line 1015 of file PlayerHandling.cpp.
|
protected |
Definition at line 261 of file PlayerHandling.cpp.
|
protected |
Invoked in every frame by all instances.
Definition at line 1601 of file PlayerHandling.cpp.
|
protected |
Definition at line 522 of file PlayerHandling.cpp.
|
private |
Definition at line 178 of file PlayerHandling.h.
|
private |
Definition at line 174 of file PlayerHandling.h.
|
private |
Definition at line 175 of file PlayerHandling.h.
|
private |
Definition at line 176 of file PlayerHandling.h.
|
private |
Definition at line 181 of file PlayerHandling.h.
|
private |
Definition at line 180 of file PlayerHandling.h.
|
private |
Definition at line 173 of file PlayerHandling.h.
|
private |
Definition at line 177 of file PlayerHandling.h.