DDraceNetwork Documentation
Loading...
Searching...
No Matches
CDragger Class Reference

#include <dragger.h>

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

Public Member Functions

 CDragger (CGameWorld *pGameWorld, int Id, const CLaserData *pData)
bool Match (CDragger *pDragger)
void Read (const CLaserData *pData)
float GetStrength () const
void Tick () override
 CDragger (CGameWorld *pGameWorld, vec2 Pos, float Strength, bool IgnoreWalls, int Layer=0, int Number=0)
void RemoveDraggerBeam (int ClientId)
bool WillDraggerBeamUseDraggerId (int TargetClientId, int SnappingClientId)
void Reset () override
void Tick () override
void Snap (int SnappingClient) override
void SwapClients (int Client1, int Client2) override
Public Member Functions inherited from CEntity
int GetId () const
 CEntity (CGameWorld *pGameWorld, int Objtype, vec2 Pos=vec2(0, 0), int ProximityRadius=0)
virtual ~CEntity ()
std::vector< SSwitchers > & Switchers ()
CGameWorldGameWorld ()
CTuningParamsGlobalTuning ()
CTuningParamsTuningList ()
CTuningParamsGetTuning (int i)
class CCollisionCollision ()
CEntityTypeNext ()
CEntityTypePrev ()
const vec2GetPos () const
float GetProximityRadius () const
virtual bool CanCollide (int ClientId)
virtual void Destroy ()
virtual void PreTick ()
virtual void TickDeferred ()
bool GameLayerClipped (vec2 CheckPos)
CEntityNextEntity ()
void Keep ()
 CEntity ()
int GetId () const
 CEntity (CGameWorld *pGameWorld, int Objtype, vec2 Pos=vec2(0, 0), int ProximityRadius=0)
virtual ~CEntity ()
std::vector< SSwitchers > & Switchers ()
CGameWorldGameWorld ()
CTuningParamsGlobalTuning ()
CTuningParamsTuningList ()
CTuningParamsGetTuning (int i)
class CConfigConfig ()
class CGameContextGameServer ()
class IServerServer ()
CCollisionCollision ()
CEntityTypeNext ()
CEntityTypePrev ()
const vec2GetPos () const
float GetProximityRadius () const
virtual void Destroy ()
virtual void TickDeferred ()
virtual void TickPaused ()
virtual ESaveResult BlocksSave (int ClientId)
virtual int GetOwnerId () const
bool NetworkClipped (int SnappingClient) const
bool NetworkClipped (int SnappingClient, vec2 CheckPos) const
bool NetworkClippedLine (int SnappingClient, vec2 StartPos, vec2 EndPos) const
bool GameLayerClipped (vec2 CheckPos)
virtual bool CanCollide (int ClientId)
bool GetNearestAirPos (vec2 Pos, vec2 PrevPos, vec2 *pOutPos)
bool GetNearestAirPosPlayer (vec2 PlayerPos, vec2 *pOutPos)

Private Member Functions

void LookForPlayersToDrag ()
void DraggerBeamTick ()
void DraggerBeamReset ()
void LookForPlayersToDrag ()

Private Attributes

vec2 m_Core
float m_Strength
bool m_IgnoreWalls
int m_TargetId
int m_EvalTick
int m_aTargetIdInTeam [MAX_CLIENTS]
CDraggerBeamm_apDraggerBeam [MAX_CLIENTS]

Additional Inherited Members

Public Attributes inherited from CEntity
float m_ProximityRadius
vec2 m_Pos
int m_Number
int m_Layer
int m_SnapTicks
int m_DestroyTick
int m_LastRenderTick
CEntitym_pParent
CEntitym_pChild
Protected Attributes inherited from CEntity
CGameWorldm_pGameWorld
bool m_MarkedForDestroy
int m_Id
int m_ObjType

Detailed Description

Draggers generate dragger beams which pull players towards their center similar to a tractor beam

A dragger will only generate one dragger beam per team for the closest player for whom the following criteria are met:

  • The player is within the dragger range (sv_dragger_range).
  • The player is not a super player
  • The dragger is activated
  • The dragger beam to be generated is not blocked by laser stoppers (or solid blocks if IgnoreWalls is set to false) With the exception of solo players, for whom a dragger beam is always generated, regardless of the rest of the team, if the above criteria are met. Solo players have no influence on the generation of the dragger beam for the rest of the team. A created dragger beam remains for the selected player until one of the criteria is no longer fulfilled. Only then can a new dragger beam be created for that team, which may drag another team partner.

Constructor & Destructor Documentation

◆ CDragger() [1/2]

CDragger::CDragger ( CGameWorld * pGameWorld,
int Id,
const CLaserData * pData )

◆ CDragger() [2/2]

CDragger::CDragger ( CGameWorld * pGameWorld,
vec2 Pos,
float Strength,
bool IgnoreWalls,
int Layer = 0,
int Number = 0 )

Member Function Documentation

◆ DraggerBeamReset()

void CDragger::DraggerBeamReset ( )
private

◆ DraggerBeamTick()

void CDragger::DraggerBeamTick ( )
private

◆ GetStrength()

float CDragger::GetStrength ( ) const
inline

◆ LookForPlayersToDrag() [1/2]

void CDragger::LookForPlayersToDrag ( )
private

◆ LookForPlayersToDrag() [2/2]

void CDragger::LookForPlayersToDrag ( )
private

◆ Match()

bool CDragger::Match ( CDragger * pDragger)

◆ Read()

void CDragger::Read ( const CLaserData * pData)

◆ RemoveDraggerBeam()

void CDragger::RemoveDraggerBeam ( int ClientId)

◆ Reset()

void CDragger::Reset ( )
overridevirtual

Reimplemented from CEntity.

◆ Snap()

void CDragger::Snap ( int SnappingClient)
overridevirtual

Reimplemented from CEntity.

◆ SwapClients()

void CDragger::SwapClients ( int Client1,
int Client2 )
overridevirtual

Reimplemented from CEntity.

◆ Tick() [1/2]

void CDragger::Tick ( )
overridevirtual

Reimplemented from CEntity.

◆ Tick() [2/2]

void CDragger::Tick ( )
overridevirtual

Reimplemented from CEntity.

◆ WillDraggerBeamUseDraggerId()

bool CDragger::WillDraggerBeamUseDraggerId ( int TargetClientId,
int SnappingClientId )

Member Data Documentation

◆ m_apDraggerBeam

CDraggerBeam* CDragger::m_apDraggerBeam[MAX_CLIENTS]
private

◆ m_aTargetIdInTeam

int CDragger::m_aTargetIdInTeam[MAX_CLIENTS]
private

◆ m_Core

vec2 CDragger::m_Core
private

◆ m_EvalTick

int CDragger::m_EvalTick
private

◆ m_IgnoreWalls

bool CDragger::m_IgnoreWalls
private

◆ m_Strength

float CDragger::m_Strength
private

◆ m_TargetId

int CDragger::m_TargetId
private

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