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

#include <dragger_beam.h>

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

Public Member Functions

 CDraggerBeam (CGameWorld *pGameWorld, CDragger *pDragger, vec2 Pos, float Strength, bool IgnoreWalls, int ForClientId, int Layer, int Number)
void SetPos (vec2 Pos)
void Reset () override
void Tick () override
void Snap (int SnappingClient) override
void SwapClients (int Client1, int Client2) override
ESaveResult BlocksSave (int ClientId) 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 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 Attributes

CDraggerm_pDragger
float m_Strength
bool m_IgnoreWalls
int m_ForClientId
int m_EvalTick
bool m_Active

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

Dragger beams pull a selected player towards their center

Dragger beams are generated by a particular dragger for the player closest to it and for whom certain criteria are met. Dragger beams exist until these criteria are no longer met. Dragger beams dissolve and automatically de-register from their dragger source as soon as the player for whom they were created:

  • is no longer alive
  • is no longer in range (sv_dragger_range)
  • can no longer be dragged because the beam is intercepted by a laser stopper (or if !IgnoreWalls by solid blocks)

Dragger beams accelerate the selected player every tick towards their center. The length of the speed vector, which is added to that of the player, depends only on the strength of the dragger and is between 1 and 3 units long. If the player is in the center of the dragger, it will not accelerate.

Constructor & Destructor Documentation

◆ CDraggerBeam()

CDraggerBeam::CDraggerBeam ( CGameWorld * pGameWorld,
CDragger * pDragger,
vec2 Pos,
float Strength,
bool IgnoreWalls,
int ForClientId,
int Layer,
int Number )

Member Function Documentation

◆ BlocksSave()

ESaveResult CDraggerBeam::BlocksSave ( int ClientId)
overridevirtual

Reimplemented from CEntity.

◆ Reset()

void CDraggerBeam::Reset ( )
overridevirtual

Reimplemented from CEntity.

◆ SetPos()

void CDraggerBeam::SetPos ( vec2 Pos)

◆ Snap()

void CDraggerBeam::Snap ( int SnappingClient)
overridevirtual

Reimplemented from CEntity.

◆ SwapClients()

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

Reimplemented from CEntity.

◆ Tick()

void CDraggerBeam::Tick ( )
overridevirtual

Reimplemented from CEntity.

Member Data Documentation

◆ m_Active

bool CDraggerBeam::m_Active
private

◆ m_EvalTick

int CDraggerBeam::m_EvalTick
private

◆ m_ForClientId

int CDraggerBeam::m_ForClientId
private

◆ m_IgnoreWalls

bool CDraggerBeam::m_IgnoreWalls
private

◆ m_pDragger

CDragger* CDraggerBeam::m_pDragger
private

◆ m_Strength

float CDraggerBeam::m_Strength
private

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