The customized game engine class.
This handles the game logic. Singleton.
Definition at line 41 of file PRooFPS-dd-PGE.h.
|
| | PRooFPSddPGE (const char *gametitle) |
| | This is the only usable ctor, this is used by the static createAndGet().
|
| |
| virtual | ~PRooFPSddPGE () |
| |
| | PRooFPSddPGE (const PRooFPSddPGE &)=delete |
| |
| PRooFPSddPGE & | operator= (const PRooFPSddPGE &)=delete |
| |
| | PRooFPSddPGE (PRooFPSddPGE &&)=delete |
| |
| PRooFPSddPGE && | operator= (PRooFPSddPGE &&)=delete |
| |
| virtual bool | onGameInitializing () override |
| | Must-have minimal stuff before loading anything.
|
| |
| virtual bool | onGameInitialized () override |
| | Loading game content here.
|
| |
| virtual void | onGameFrameBegin () override |
| | Game logic right before the engine would do anything.
|
| |
| virtual void | onGameRunning () override |
| | Game logic for each frame.
|
| |
| virtual bool | onPacketReceived (const pge_network::PgePacket &pkt) override |
| | Called when a new network packet is received.
|
| |
| virtual void | onGameDestroying () override |
| | Freeing up game content here.
|
| |
Protected Member Functions inherited from proofps_dd::CameraHandling |
| void | cameraInitForGameStart () |
| |
| void | cameraPositionToMapCenter () |
| |
| void | cameraUpdatePosAndAngle (pge_audio::PgeAudio &audio, const std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > &mapPlayers, const Player &player, XHair &xhair, const float &fFps, bool bCamFollowsXHair, bool bCamTiltingAllowed, bool bCamRollAllowed) |
| |
| PureVector & | cameraGetShakeForce () |
| |
| CConsole & | getConsole () const |
| |
| | CameraHandling (PR00FsUltimateRenderingEngine &pure, Durations &durations, Maps &maps) |
| |
| | CameraHandling (const CameraHandling &)=delete |
| |
| CameraHandling & | operator= (const CameraHandling &)=delete |
| |
| | CameraHandling (CameraHandling &&)=delete |
| |
| CameraHandling && | operator= (CameraHandling &&)=delete |
| |
| SpectatingView & | cameraGetSpectatingView () |
| |
| void | cameraToggleSpectatingView () |
| | Toggles between different camera spectating views.
|
| |
| PureVector & | cameraGetPosToFollowWhenSpectating () |
| | This is essentially controlled by cameraUpdatePosAndAngle() when we are in spectator mode, however it is allowed to be accessed by the user to update it in "free camera spectating view".
|
| |
| const pge_network::PgeNetworkConnectionHandle & | cameraGetPlayerConnectionHandleToFollowWhenSpectating () const |
| |
| bool | findNextValidPlayerToFollowInPlayerSpectatingView (const std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > &mapPlayers) |
| | Useful when we want to iterate to the next spectatable player in "player follow spectating view".
|
| |
| bool | findPrevValidPlayerToFollowInPlayerSpectatingView (const std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > &mapPlayers) |
| | Useful when we want to iterate to the previous spectatable player in "player follow spectating view".
|
| |
| bool | findAnyValidPlayerToFollowInPlayerSpectatingView (const std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > &mapPlayers, PureVector &posPlayerToFollow) |
| | Useful when we are toggling spectating view to player follow view, or in each frame to check if followed player is still valid in player follow view.
|
| |
Protected Member Functions inherited from proofps_dd::InputHandling |
| PlayerAppActionRequest | clientHandleInputWhenConnectedAndSendUserCmdMoveToServer (proofps_dd::GameMode &gameMode, proofps_dd::Player &player, proofps_dd::XHair &xhair, const unsigned int nTickrate, const unsigned int nClUpdateRate, const unsigned int nPhysicsRateMin, proofps_dd::WeaponHandling &wpnHandling) |
| |
| PlayerAppActionRequest | clientHandleInputWhenDisconnectedFromServer () |
| |
| bool | serverHandleUserCmdMoveFromClient (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const proofps_dd::MsgUserCmdFromClient &msg, proofps_dd::GameMode &gameMode, proofps_dd::WeaponHandling &wpnHandling) |
| |
| CConsole & | getConsole () const |
| |
| | InputHandling (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) |
| |
| | InputHandling (const InputHandling &)=delete |
| |
| InputHandling & | operator= (const InputHandling &)=delete |
| |
| | InputHandling (InputHandling &&)=delete |
| |
| InputHandling && | operator= (InputHandling &&)=delete |
| |
Protected Member Functions inherited from proofps_dd::PlayerHandling |
| 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.
|
| |
| 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 |
| |
| 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 |
| |
| CConsole & | getConsole () const |
| |
| | Sounds () |
| |
| | Sounds (const Sounds &)=delete |
| |
| Sounds & | operator= (const Sounds &)=delete |
| |
| | Sounds (Sounds &&)=delete |
| |
| Sounds && | operator= (Sounds &&)=delete |
| |
Protected Member Functions inherited from proofps_dd::WeaponHandling |
| void | deleteWeaponHandlingAll (const bool &bDeallocBullets) |
| |
| void | serverUpdateWeapons (proofps_dd::GameMode &gameMode) |
| |
| void | serverDeleteAllBulletsNow (proofps_dd::GameMode &gameMode, XHair &xhair, PureVector &vecCamShakeForce) |
| |
| void | serverUpdateBulletsAndHandleHittingWallsAndPlayers (proofps_dd::GameMode &gameMode, XHair &xhair, const unsigned int &nPhysicsRate, PureVector &vecCamShakeForce) |
| |
| void | serverHandleBulletsVsBullets (proofps_dd::GameMode &gameMode, XHair &xhair, const unsigned int &nPhysicsRate, PureVector &vecCamShakeForce) |
| | This function does not update bullet positions, it expects up-to-date bullet positions.
|
| |
| void | clientUpdateBullets (const unsigned int &nPhysicsRate) |
| |
| void | serverUpdateExplosions (proofps_dd::GameMode &gameMode, const unsigned int &nPhysicsRate) |
| |
| void | clientUpdateExplosions (proofps_dd::GameMode &gameMode, const unsigned int &nPhysicsRate) |
| |
| void | updateSmokes (proofps_dd::GameMode &gameMode, const unsigned int &nPhysicsRate) |
| |
| bool | handleBulletUpdateFromServer (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const proofps_dd::MsgBulletUpdateFromServer &msg, PureVector &vecCamShakeForce) |
| |
| bool | handleWpnUpdateFromServer (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const proofps_dd::MsgWpnUpdateFromServer &msg) |
| |
| bool | handleWpnUpdateCurrentFromServer (pge_network::PgeNetworkConnectionHandle connHandleServerSide, const proofps_dd::MsgCurrentWpnUpdateFromServer &msg) |
| |
| void | handleCurrentPlayersCurrentWeaponStateChangeShared (const Player &player, Weapon &wpnCurrent, const Weapon::State &oldState, const Weapon::State &newState, const TPureUInt &nMagCount, const TPureUInt &nUnmagCount) |
| |
| void | handleAutoSwitchUponWeaponPickupShared (const Player &player, Weapon &wpnCurrent, Weapon &wpnPicked, const bool &bHasJustBecomeAvailable) |
| | This function was made specifically for deciding if we initiate auto-switch upon picking up a weapon.
|
| |
| CConsole & | getConsole () const |
| |
| | WeaponHandling (PGE &pge, proofps_dd::Config &config, 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) |
| |
| | WeaponHandling (const WeaponHandling &)=delete |
| |
| WeaponHandling & | operator= (const WeaponHandling &)=delete |
| |
| | WeaponHandling (WeaponHandling &&)=delete |
| |
| WeaponHandling && | operator= (WeaponHandling &&)=delete |
| |
| bool | initializeWeaponHandling (PGEcfgProfiles &cfgProfiles) |
| |
| void | handleCurrentPlayersCurrentWeaponBulletCountsChangeShared (const Player &player, Weapon &wpnCurrent, const TPureUInt &nOldMagCount, const TPureUInt &nNewMagCount, const TPureUInt &nOldUnmagCount, const TPureUInt &nNewUnmagCount, const Weapon::State &oldState, const Weapon::State &newState) |
| |
| const bool & | getWeaponAutoReloadRequest () const |
| |
| void | clearWeaponAutoReloadRequest () |
| |
| void | scheduleWeaponAutoReloadRequest () |
| |
| const bool & | getWeaponAutoSwitchToBestLoadedRequest () const |
| |
| void | clearWeaponAutoSwitchToBestLoadedRequest () |
| |
| void | scheduleWeaponAutoSwitchToBestLoadedRequest () |
| |
| const bool & | getWeaponAutoSwitchToBestWithAnyKindOfAmmoRequest () const |
| |
| void | clearWeaponAutoSwitchToBestWithAnyKindOfAmmoRequest () |
| |
| void | scheduleWeaponAutoSwitchToBestWithAnyKindOfAmmoRequest () |
| |
| Weapon * | getWeaponPickupInducedAutoSwitchRequest () const |
| |
| void | clearWeaponPickupInducedAutoSwitchRequest () |
| |
| void | scheduleWeaponPickupInducedAutoSwitchRequest (Weapon *wpn) |
| |
| PgeObjectPool< Smoke > & | getSmokePool () |
| |
| const PgeObjectPool< Smoke > & | getSmokePool () const |
| |
| void | serverSetAllowStrafeMidAir (bool bAllow) |
| |
| void | serverSetAllowStrafeMidAirFull (bool bAllow) |
| |
| void | serverSetFallDamageMultiplier (int n) |
| |
| void | serverSetCollisionModeBvh (bool state) |
| |
| void | serverGravity (XHair &xhair, const unsigned int &nPhysicsRate, proofps_dd::GameMode &gameMode) |
| |
| void | serverPlayerCollisionWithWalls (const unsigned int &nPhysicsRate, XHair &xhair, proofps_dd::GameMode &gameMode, PureVector &vecCamShakeForce) |
| |
| CConsole & | getConsole () const |
| |
| | Physics (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) |
| |
| | Physics (const Physics &)=delete |
| |
| Physics & | operator= (const Physics &)=delete |
| |
| | Physics (Physics &&)=delete |
| |
| Physics && | operator= (Physics &&)=delete |
| |
|
Protected Types inherited from proofps_dd::CameraHandling |
| enum class | SpectatingView { Free
, PlayerFollow
} |
| |
Protected Types inherited from proofps_dd::InputHandling |
| enum | PlayerAppActionRequest { None
, Exit
} |
| |
Static Protected Member Functions inherited from proofps_dd::CameraHandling |
| static const char * | getLoggerModuleName () |
| |
| static bool | canSpectatePlayer (const Player &player) |
| | Use this function when iterating over players, to decide if we can spectate this player.
|
| |
Static Protected Member Functions inherited from proofps_dd::InputHandling |
| static const char * | getLoggerModuleName () |
| |
Static Protected Member Functions inherited from proofps_dd::PlayerHandling |
| static const char * | getLoggerModuleName () |
| |
| static const char * | getLoggerModuleName () |
| |
| static const char * | getLoggerModuleName () |
| |
Static Protected Member Functions inherited from proofps_dd::WeaponHandling |
| static const char * | getLoggerModuleName () |
| |
| static const char * | getLoggerModuleName () |
| |
| static bool | colliding (const PureObject3D &a, const PureObject3D &b) |
| |
| static bool | colliding_NoZ (const PureObject3D &a, const PureObject3D &b) |
| |
| static bool | colliding2 (float o1px, float o1py, float o1pz, float o1sx, float o1sy, float o1sz, float o2px, float o2py, float o2pz, float o2sx, float o2sy, float o2sz) |
| |
| static bool | colliding2_NoZ (float o1px, float o1py, float o1sx, float o1sy, float o2px, float o2py, float o2sx, float o2sy) |
| |
| static bool | colliding3 (const PureVector &vecPosMin, const PureVector &vecPosMax, const PureVector &vecObjPos, const PureVector &vecObjSize) |
| |
| static float | distance_NoZ (float o1px, float o1py, float o2px, float o2py) |
| |
| static float | distance_NoZ (float o1px, float o1py, float o1sx, float o1sy, float o2px, float o2py) |
| |
| static float | distance_NoZ_with_distancePerAxis (float o1px, float o1py, float o1sx, float o1sy, float o2px, float o2py, PureVector &vDirPerAxis, PureVector &vDistancePerAxis) |
| |
| pge_network::PgeNetworkConnectionHandle | m_nServerSideConnectionHandle |
| | Server-side connection handle received from server in PgePktUserConnected (server instance also receives this from itself).
|
| |
| SoLoud::Wav | m_sndMenuMusic |
| |
| SoLoud::handle | m_sndMenuMusicHandle {} |
| |
| SoLoud::Wav | m_sndEndgameMusic |
| |
| SoLoud::handle | m_sndEndgameMusicHandle {} |
| |
| SoLoud::Wav | m_sndRoundWin |
| |
| SoLoud::handle | m_sndRoundWinHandle {} |
| |
| SoLoud::Wav | m_sndLetsgo |
| |
| SoLoud::Wav | m_sndChangeWeapon |
| |
| SoLoud::Wav | m_sndPlayerDie |
| |
Static Protected Attributes inherited from proofps_dd::InputHandling |
| static constexpr std::chrono::milliseconds::rep | m_nKeyPressOnceWpnHandlingMinumumWaitMilliseconds = 500 |
| |
| static constexpr std::chrono::milliseconds::rep | m_nKeyPressOnceJumpMinumumWaitMilliseconds = 50 |
| |
| static constexpr std::chrono::milliseconds::rep | m_nKeyPressOnceToggleUseItemMinumumWaitMilliseconds = 50 |
| |
| static constexpr std::chrono::milliseconds::rep | m_nKeyPressSomersaultMaximumWaitMilliseconds = 300 |
| |
| static constexpr std::chrono::milliseconds::rep | m_nWeaponActionMinimumWaitMillisecondsAfterSwitch = 1000 |
| |
| static constexpr std::chrono::milliseconds::rep | m_nPlayerAngleYSendIntervalMilliseconds = 100 |
| |
| static constexpr std::chrono::milliseconds::rep | m_nWeaponAngleZBigChangeSendIntervalMilliseconds = 100 |
| |
| static constexpr std::chrono::milliseconds::rep | m_nWeaponAngleZSmallChangeSendIntervalMilliseconds = 200 |
| |
| static constexpr float | m_fWeaponAngleZBigChangeThreshold = 30.f |
| |
| static constexpr char * | szCVarClServerIp = "cl_server_ip" |
| |