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

Detailed Description

Definition at line 29 of file InputHandling.h.

#include <InputHandling.h>

+ Inheritance diagram for proofps_dd::InputHandling:

Public Types

enum  PlayerAppActionRequest { None , Exit }
 

Public Member Functions

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)
 
 InputHandling (const InputHandling &)=delete
 
InputHandlingoperator= (const InputHandling &)=delete
 
 InputHandling (InputHandling &&)=delete
 
InputHandling && operator= (InputHandling &&)=delete
 

Static Public Member Functions

static const char * getLoggerModuleName ()
 

Static Public Attributes

static constexpr unsigned int m_nKeyPressOnceWpnHandlingMinumumWaitMilliseconds = 500
 
static constexpr unsigned int m_nKeyPressOnceJumpMinumumWaitMilliseconds = 50
 
static constexpr unsigned int m_nKeyPressSomersaultMaximumWaitMilliseconds = 300
 
static constexpr unsigned int m_nWeaponActionMinimumWaitMillisecondsAfterSwitch = 1000
 
static constexpr unsigned int m_nPlayerAngleYSendIntervalMilliseconds = 100
 
static constexpr unsigned int m_nWeaponAngleZBigChangeSendIntervalMilliseconds = 100
 
static constexpr unsigned int m_nWeaponAngleZSmallChangeSendIntervalMilliseconds = 200
 
static constexpr float m_fWeaponAngleZBigChangeThreshold = 30.f
 

Protected Member Functions

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::WeaponHandling &wpnHandling)
 

Private Member Functions

PlayerAppActionRequest clientKeyboardWhenConnectedToServer (proofps_dd::GameMode &gameMode, pge_network::PgePacket &pkt, proofps_dd::Player &player, const unsigned int nTickrate, const unsigned int nClUpdateRate, const unsigned int nPhysicsRateMin, proofps_dd::WeaponHandling &wpnHandling)
 
PlayerAppActionRequest clientKeyboardWhenDisconnectedFromServer ()
 
bool clientMouseWhenConnectedToServer (proofps_dd::GameMode &gameMode, pge_network::PgePacket &pkt, proofps_dd::Player &player, PureObject3D &objXHair)
 
void clientUpdatePlayerAsPerInputAndSendUserCmdMoveToServer (pge_network::PgePacket &pkt, proofps_dd::Player &player, PureObject3D &objXHair)
 
void clientMouseWheel (const short int &nMouseWheelChange, pge_network::PgePacket &pkt, proofps_dd::Player &player)
 
void regTestDumpToFile (proofps_dd::GameMode &gameMode, proofps_dd::Player &player, const unsigned int nTickrate, const unsigned int nClUpdateRate, const unsigned int nPhysicsRateMin)
 

Static Private Member Functions

static const char * getMsgAppIdName (const proofps_dd::PRooFPSappMsgId &id)
 
static const size_t getLongestMsgAppIdNameLength ()
 

Private Attributes

PGE & m_pge
 
Durationsm_durations
 
proofps_dd::GUIm_gui
 
std::map< pge_network::PgeNetworkConnectionHandle, proofps_dd::Player > & m_mapPlayers
 
Mapsm_maps
 
Soundsm_sounds
 
Strafe m_prevStrafe
 
Strafe m_strafe
 
bool m_bPrevAttack
 
bool m_bAttack
 
bool m_bPrevCrouch
 
bool m_bCrouch
 
TPureFloat m_fLastPlayerAngleYSent
 
TPureFloat m_fLastWeaponAngleZSent
 

Member Enumeration Documentation

◆ PlayerAppActionRequest

Enumerator
None 
Exit 

Definition at line 33 of file InputHandling.h.

Constructor & Destructor Documentation

◆ InputHandling() [1/3]

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

Definition at line 30 of file InputHandling.cpp.

◆ InputHandling() [2/3]

proofps_dd::InputHandling::InputHandling ( const InputHandling & )
delete

◆ InputHandling() [3/3]

proofps_dd::InputHandling::InputHandling ( InputHandling && )
delete

Member Function Documentation

◆ clientHandleInputWhenConnectedAndSendUserCmdMoveToServer()

proofps_dd::InputHandling::PlayerAppActionRequest proofps_dd::InputHandling::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 )
protected

Definition at line 76 of file InputHandling.cpp.

◆ clientHandleInputWhenDisconnectedFromServer()

proofps_dd::InputHandling::PlayerAppActionRequest proofps_dd::InputHandling::clientHandleInputWhenDisconnectedFromServer ( )
protected

Definition at line 100 of file InputHandling.cpp.

◆ clientKeyboardWhenConnectedToServer()

proofps_dd::InputHandling::PlayerAppActionRequest proofps_dd::InputHandling::clientKeyboardWhenConnectedToServer ( proofps_dd::GameMode & gameMode,
pge_network::PgePacket & pkt,
proofps_dd::Player & player,
const unsigned int nTickrate,
const unsigned int nClUpdateRate,
const unsigned int nPhysicsRateMin,
proofps_dd::WeaponHandling & wpnHandling )
private

Definition at line 487 of file InputHandling.cpp.

◆ clientKeyboardWhenDisconnectedFromServer()

proofps_dd::InputHandling::PlayerAppActionRequest proofps_dd::InputHandling::clientKeyboardWhenDisconnectedFromServer ( )
private

Definition at line 831 of file InputHandling.cpp.

◆ clientMouseWheel()

void proofps_dd::InputHandling::clientMouseWheel ( const short int & nMouseWheelChange,
pge_network::PgePacket & pkt,
proofps_dd::Player & player )
private

Definition at line 1057 of file InputHandling.cpp.

◆ clientMouseWhenConnectedToServer()

bool proofps_dd::InputHandling::clientMouseWhenConnectedToServer ( proofps_dd::GameMode & gameMode,
pge_network::PgePacket & pkt,
proofps_dd::Player & player,
PureObject3D & objXHair )
private
Returns
True in case there was mouse (xhair) movement, false otherwise.

Definition at line 843 of file InputHandling.cpp.

◆ clientUpdatePlayerAsPerInputAndSendUserCmdMoveToServer()

void proofps_dd::InputHandling::clientUpdatePlayerAsPerInputAndSendUserCmdMoveToServer ( pge_network::PgePacket & pkt,
proofps_dd::Player & player,
PureObject3D & objXHair )
private

Definition at line 979 of file InputHandling.cpp.

◆ getConsole()

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

Definition at line 62 of file InputHandling.cpp.

◆ getLoggerModuleName()

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

Definition at line 67 of file InputHandling.cpp.

◆ getLongestMsgAppIdNameLength()

const size_t proofps_dd::InputHandling::getLongestMsgAppIdNameLength ( )
staticprivate

Definition at line 1111 of file InputHandling.cpp.

◆ getMsgAppIdName()

const char * proofps_dd::InputHandling::getMsgAppIdName ( const proofps_dd::PRooFPSappMsgId & id)
staticprivate

Definition at line 1102 of file InputHandling.cpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ regTestDumpToFile()

void proofps_dd::InputHandling::regTestDumpToFile ( proofps_dd::GameMode & gameMode,
proofps_dd::Player & player,
const unsigned int nTickrate,
const unsigned int nClUpdateRate,
const unsigned int nPhysicsRateMin )
private

Definition at line 1125 of file InputHandling.cpp.

◆ serverHandleUserCmdMoveFromClient()

bool proofps_dd::InputHandling::serverHandleUserCmdMoveFromClient ( pge_network::PgeNetworkConnectionHandle connHandleServerSide,
const proofps_dd::MsgUserCmdFromClient & msg,
proofps_dd::WeaponHandling & wpnHandling )
protected

Definition at line 105 of file InputHandling.cpp.

Member Data Documentation

◆ m_bAttack

bool proofps_dd::InputHandling::m_bAttack
private

Definition at line 102 of file InputHandling.h.

◆ m_bCrouch

bool proofps_dd::InputHandling::m_bCrouch
private

Definition at line 104 of file InputHandling.h.

◆ m_bPrevAttack

bool proofps_dd::InputHandling::m_bPrevAttack
private

Definition at line 101 of file InputHandling.h.

◆ m_bPrevCrouch

bool proofps_dd::InputHandling::m_bPrevCrouch
private

Definition at line 103 of file InputHandling.h.

◆ m_durations

Durations& proofps_dd::InputHandling::m_durations
private

Definition at line 93 of file InputHandling.h.

◆ m_fLastPlayerAngleYSent

TPureFloat proofps_dd::InputHandling::m_fLastPlayerAngleYSent
private

Definition at line 105 of file InputHandling.h.

◆ m_fLastWeaponAngleZSent

TPureFloat proofps_dd::InputHandling::m_fLastWeaponAngleZSent
private

Definition at line 106 of file InputHandling.h.

◆ m_fWeaponAngleZBigChangeThreshold

float proofps_dd::InputHandling::m_fWeaponAngleZBigChangeThreshold = 30.f
staticconstexpr

Definition at line 46 of file InputHandling.h.

◆ m_gui

proofps_dd::GUI& proofps_dd::InputHandling::m_gui
private

Definition at line 94 of file InputHandling.h.

◆ m_mapPlayers

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

Definition at line 95 of file InputHandling.h.

◆ m_maps

Maps& proofps_dd::InputHandling::m_maps
private

Definition at line 96 of file InputHandling.h.

◆ m_nKeyPressOnceJumpMinumumWaitMilliseconds

const unsigned int proofps_dd::InputHandling::m_nKeyPressOnceJumpMinumumWaitMilliseconds = 50
staticconstexpr

Definition at line 40 of file InputHandling.h.

◆ m_nKeyPressOnceWpnHandlingMinumumWaitMilliseconds

const unsigned int proofps_dd::InputHandling::m_nKeyPressOnceWpnHandlingMinumumWaitMilliseconds = 500
staticconstexpr

Definition at line 39 of file InputHandling.h.

◆ m_nKeyPressSomersaultMaximumWaitMilliseconds

unsigned int proofps_dd::InputHandling::m_nKeyPressSomersaultMaximumWaitMilliseconds = 300
staticconstexpr

Definition at line 41 of file InputHandling.h.

◆ m_nPlayerAngleYSendIntervalMilliseconds

unsigned int proofps_dd::InputHandling::m_nPlayerAngleYSendIntervalMilliseconds = 100
staticconstexpr

Definition at line 43 of file InputHandling.h.

◆ m_nWeaponActionMinimumWaitMillisecondsAfterSwitch

const unsigned int proofps_dd::InputHandling::m_nWeaponActionMinimumWaitMillisecondsAfterSwitch = 1000
staticconstexpr

Definition at line 42 of file InputHandling.h.

◆ m_nWeaponAngleZBigChangeSendIntervalMilliseconds

unsigned int proofps_dd::InputHandling::m_nWeaponAngleZBigChangeSendIntervalMilliseconds = 100
staticconstexpr

Definition at line 44 of file InputHandling.h.

◆ m_nWeaponAngleZSmallChangeSendIntervalMilliseconds

unsigned int proofps_dd::InputHandling::m_nWeaponAngleZSmallChangeSendIntervalMilliseconds = 200
staticconstexpr

Definition at line 45 of file InputHandling.h.

◆ m_pge

PGE& proofps_dd::InputHandling::m_pge
private

Definition at line 92 of file InputHandling.h.

◆ m_prevStrafe

Strafe proofps_dd::InputHandling::m_prevStrafe
private

Definition at line 99 of file InputHandling.h.

◆ m_sounds

Sounds& proofps_dd::InputHandling::m_sounds
private

Definition at line 97 of file InputHandling.h.

◆ m_strafe

Strafe proofps_dd::InputHandling::m_strafe
private

Definition at line 100 of file InputHandling.h.


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