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

Detailed Description

Definition at line 29 of file Physics.h.

#include <Physics.h>

+ Inheritance diagram for proofps_dd::Physics:

Public Member Functions

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)
 
 Physics (const Physics &)=delete
 
Physicsoperator= (const Physics &)=delete
 
 Physics (Physics &&)=delete
 
Physics && operator= (Physics &&)=delete
 

Static Public Member Functions

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)
 

Protected Member Functions

void serverSetAllowStrafeMidAir (bool bAllow)
 
void serverSetAllowStrafeMidAirFull (bool bAllow)
 
void serverSetFallDamageMultiplier (int n)
 
void serverGravity (XHair &xhair, const unsigned int &nPhysicsRate, proofps_dd::GameMode &gameMode)
 
void serverPlayerCollisionWithWalls (const unsigned int &nPhysicsRate, XHair &xhair, proofps_dd::GameMode &gameMode)
 
bool serverPlayerCollisionWithWalls_LoopKernelVertical (Player &player, const PureObject3D *obj, const int &iJumppad, const float &fPlayerHalfHeight, const float &fPlayerOPos1XMinusHalf, const float &fPlayerOPos1XPlusHalf, const float &fPlayerPos1YMinusHalf, const float &fPlayerPos1YPlusHalf, const float &fBlockSizeXhalf, const float &fBlockSizeYhalf, XHair &xhair, proofps_dd::GameMode &gameMode)
 
- Protected Member Functions inherited from proofps_dd::PlayerHandling
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)
 
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
 
- 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::Durationsm_durations
 
std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > & m_mapPlayers
 
proofps_dd::Mapsm_maps
 
proofps_dd::Soundsm_sounds
 
bool m_bAllowStrafeMidAir
 
bool m_bAllowStrafeMidAirFull
 
int m_nFallDamageMultiplier
 

Additional Inherited Members

- Static Protected Member Functions inherited from proofps_dd::PlayerHandling
static const char * getLoggerModuleName ()
 
- 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

◆ Physics() [1/3]

proofps_dd::Physics::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 )

Definition at line 21 of file Physics.cpp.

◆ Physics() [2/3]

proofps_dd::Physics::Physics ( const Physics & )
delete

◆ Physics() [3/3]

proofps_dd::Physics::Physics ( Physics && )
delete

Member Function Documentation

◆ colliding()

bool proofps_dd::Physics::colliding ( const PureObject3D & a,
const PureObject3D & b )
static

Definition at line 59 of file Physics.cpp.

◆ colliding2()

bool proofps_dd::Physics::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

Definition at line 79 of file Physics.cpp.

◆ colliding2_NoZ()

bool proofps_dd::Physics::colliding2_NoZ ( float o1px,
float o1py,
float o1sx,
float o1sy,
float o2px,
float o2py,
float o2sx,
float o2sy )
static

Definition at line 104 of file Physics.cpp.

◆ colliding3()

bool proofps_dd::Physics::colliding3 ( const PureVector & vecPosMin,
const PureVector & vecPosMax,
const PureVector & vecObjPos,
const PureVector & vecObjSize )
static

Definition at line 207 of file Physics.cpp.

◆ colliding_NoZ()

bool proofps_dd::Physics::colliding_NoZ ( const PureObject3D & a,
const PureObject3D & b )
static

Definition at line 69 of file Physics.cpp.

◆ distance_NoZ() [1/2]

float proofps_dd::Physics::distance_NoZ ( float o1px,
float o1py,
float o1sx,
float o1sy,
float o2px,
float o2py )
static

Definition at line 132 of file Physics.cpp.

◆ distance_NoZ() [2/2]

float proofps_dd::Physics::distance_NoZ ( float o1px,
float o1py,
float o2px,
float o2py )
static

Definition at line 123 of file Physics.cpp.

◆ distance_NoZ_with_distancePerAxis()

float proofps_dd::Physics::distance_NoZ_with_distancePerAxis ( float o1px,
float o1py,
float o1sx,
float o1sy,
float o2px,
float o2py,
PureVector & vDirPerAxis,
PureVector & vDistancePerAxis )
static

Definition at line 164 of file Physics.cpp.

◆ getConsole()

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

Definition at line 48 of file Physics.cpp.

◆ getLoggerModuleName()

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

Definition at line 53 of file Physics.cpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ serverGravity()

void proofps_dd::Physics::serverGravity ( XHair & xhair,
const unsigned int & nPhysicsRate,
proofps_dd::GameMode & gameMode )
protected

Definition at line 249 of file Physics.cpp.

◆ serverPlayerCollisionWithWalls()

void proofps_dd::Physics::serverPlayerCollisionWithWalls ( const unsigned int & nPhysicsRate,
XHair & xhair,
proofps_dd::GameMode & gameMode )
protected

Definition at line 380 of file Physics.cpp.

◆ serverPlayerCollisionWithWalls_LoopKernelVertical()

bool proofps_dd::Physics::serverPlayerCollisionWithWalls_LoopKernelVertical ( proofps_dd::Player & player,
const PureObject3D * obj,
const int & iJumppad,
const float & fPlayerHalfHeight,
const float & fPlayerOPos1XMinusHalf,
const float & fPlayerOPos1XPlusHalf,
const float & fPlayerPos1YMinusHalf,
const float & fPlayerPos1YPlusHalf,
const float & fBlockSizeXhalf,
const float & fBlockSizeYhalf,
XHair & xhair,
proofps_dd::GameMode & gameMode )
protected

Definition at line 742 of file Physics.cpp.

◆ serverSetAllowStrafeMidAir()

void proofps_dd::Physics::serverSetAllowStrafeMidAir ( bool bAllow)
protected

Definition at line 234 of file Physics.cpp.

◆ serverSetAllowStrafeMidAirFull()

void proofps_dd::Physics::serverSetAllowStrafeMidAirFull ( bool bAllow)
protected

Definition at line 239 of file Physics.cpp.

◆ serverSetFallDamageMultiplier()

void proofps_dd::Physics::serverSetFallDamageMultiplier ( int n)
protected

Definition at line 244 of file Physics.cpp.

Member Data Documentation

◆ m_bAllowStrafeMidAir

bool proofps_dd::Physics::m_bAllowStrafeMidAir
private

Definition at line 116 of file Physics.h.

◆ m_bAllowStrafeMidAirFull

bool proofps_dd::Physics::m_bAllowStrafeMidAirFull
private

Definition at line 117 of file Physics.h.

◆ m_durations

proofps_dd::Durations& proofps_dd::Physics::m_durations
private

Definition at line 112 of file Physics.h.

◆ m_mapPlayers

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

Definition at line 113 of file Physics.h.

◆ m_maps

proofps_dd::Maps& proofps_dd::Physics::m_maps
private

Definition at line 114 of file Physics.h.

◆ m_nFallDamageMultiplier

int proofps_dd::Physics::m_nFallDamageMultiplier
private

Definition at line 118 of file Physics.h.

◆ m_pge

PGE& proofps_dd::Physics::m_pge
private

Definition at line 111 of file Physics.h.

◆ m_sounds

proofps_dd::Sounds& proofps_dd::Physics::m_sounds
private

Definition at line 115 of file Physics.h.


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