DDraceNetwork Docs
CControls Class Reference

#include <controls.h>

Inheritance diagram for CControls:
[legend]
Collaboration diagram for CControls:
[legend]

Public Member Functions

 CControls ()
 
virtual int Sizeof () const override
 
virtual void OnReset () override
 
virtual void OnRender () override
 
virtual void OnMessage (int MsgType, void *pRawMsg) override
 
virtual bool OnCursorMove (float x, float y, IInput::ECursorType CursorType) override
 
virtual void OnConsoleInit () override
 
virtual void OnPlayerDeath ()
 
int SnapInput (int *pData)
 
void ClampMousePos ()
 
void ResetInput (int Dummy)
 
- Public Member Functions inherited from CComponent
virtual ~CComponent ()
 
virtual int Sizeof () const =0
 
class CGameClientGameClient () const
 
class IClientClient () const
 
virtual void OnStateChange (int NewState, int OldState)
 
virtual void OnConsoleInit ()
 
virtual void OnInit ()
 
virtual void OnShutdown ()
 
virtual void OnReset ()
 
virtual void OnWindowResize ()
 
virtual void OnRefreshSkins ()
 
virtual void OnRender ()
 
virtual void OnNewSnapshot ()
 
virtual void OnRelease ()
 
virtual void OnMapLoad ()
 
virtual void OnMessage (int Msg, void *pRawMsg)
 
virtual bool OnCursorMove (float x, float y, IInput::ECursorType CursorType)
 
virtual bool OnInput (const IInput::CEvent &Event)
 

Public Attributes

vec2 m_aMousePos [NUM_DUMMIES]
 
vec2 m_aMousePosOnAction [NUM_DUMMIES]
 
vec2 m_aTargetPos [NUM_DUMMIES]
 
int m_aAmmoCount [NUM_WEAPONS]
 
int64_t m_LastSendTime
 
CNetObj_PlayerInput m_aInputData [NUM_DUMMIES]
 
CNetObj_PlayerInput m_aLastData [NUM_DUMMIES]
 
int m_aInputDirectionLeft [NUM_DUMMIES]
 
int m_aInputDirectionRight [NUM_DUMMIES]
 
int m_aShowHookColl [NUM_DUMMIES]
 

Private Member Functions

float GetMinMouseDistance () const
 
float GetMaxMouseDistance () const
 

Additional Inherited Members

- Protected Member Functions inherited from CComponent
class IKernelKernel () const
 
class IEngineEngine () const
 
class IGraphicsGraphics () const
 
class ITextRenderTextRender () const
 
class IInputInput () const
 
class IStorageStorage () const
 
class CUiUi () const
 
class ISoundSound () const
 
class CRenderToolsRenderTools () const
 
class IConfigManagerConfigManager () const
 
class CConfigConfig () const
 
class IConsoleConsole () const
 
class IDemoPlayerDemoPlayer () const
 
class IDemoRecorderDemoRecorder (int Recorder) const
 
class IFavoritesFavorites () const
 
class IServerBrowserServerBrowser () const
 
class CLayersLayers () const
 
class CCollisionCollision () const
 
int64_t time () const
 
float LocalTime () const
 
class IHttpHttp () const
 
- Protected Attributes inherited from CComponent
CGameClientm_pClient
 

Constructor & Destructor Documentation

◆ CControls()

CControls::CControls ( )

Member Function Documentation

◆ ClampMousePos()

void CControls::ClampMousePos ( )

◆ GetMaxMouseDistance()

float CControls::GetMaxMouseDistance ( ) const
private

◆ GetMinMouseDistance()

float CControls::GetMinMouseDistance ( ) const
private

◆ OnConsoleInit()

void CControls::OnConsoleInit ( )
overridevirtual

Called to let the components register their console commands.

Reimplemented from CComponent.

◆ OnCursorMove()

bool CControls::OnCursorMove ( float  x,
float  y,
IInput::ECursorType  CursorType 
)
overridevirtual

Called on mouse movement, where the x and y values are deltas.

Parameters
xThe amount of change in the x coordinate since the last call.
yThe amount of change in the y coordinate since the last call.
CursorTypeThe type of cursor that caused the movement.

Reimplemented from CComponent.

◆ OnMessage()

void CControls::OnMessage ( int  Msg,
void *  pRawMsg 
)
overridevirtual

Called when receiving a network message.

Parameters
MsgThe message type.
pRawMsgThe message data.
See also
NETMSGTYPE_SV_DDRACETIME
CNetMsg_Sv_DDRaceTime

Reimplemented from CComponent.

◆ OnPlayerDeath()

void CControls::OnPlayerDeath ( )
virtual

◆ OnRender()

void CControls::OnRender ( )
overridevirtual

Called when the component should get rendered.

The render order depends on the component insertion order.

Reimplemented from CComponent.

◆ OnReset()

void CControls::OnReset ( )
overridevirtual

Called to reset the component. This method is usually called on your component constructor to avoid code duplication.

See also
CHud::CHud()
CHud::OnReset()

Reimplemented from CComponent.

◆ ResetInput()

void CControls::ResetInput ( int  Dummy)

◆ Sizeof()

virtual int CControls::Sizeof ( ) const
inlineoverridevirtual

Gets the size of the non-abstract component.

Implements CComponent.

◆ SnapInput()

int CControls::SnapInput ( int *  pData)

Member Data Documentation

◆ m_aAmmoCount

int CControls::m_aAmmoCount[NUM_WEAPONS]

◆ m_aInputData

CNetObj_PlayerInput CControls::m_aInputData[NUM_DUMMIES]

◆ m_aInputDirectionLeft

int CControls::m_aInputDirectionLeft[NUM_DUMMIES]

◆ m_aInputDirectionRight

int CControls::m_aInputDirectionRight[NUM_DUMMIES]

◆ m_aLastData

CNetObj_PlayerInput CControls::m_aLastData[NUM_DUMMIES]

◆ m_aMousePos

vec2 CControls::m_aMousePos[NUM_DUMMIES]

◆ m_aMousePosOnAction

vec2 CControls::m_aMousePosOnAction[NUM_DUMMIES]

◆ m_aShowHookColl

int CControls::m_aShowHookColl[NUM_DUMMIES]

◆ m_aTargetPos

vec2 CControls::m_aTargetPos[NUM_DUMMIES]

◆ m_LastSendTime

int64_t CControls::m_LastSendTime

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