DDraceNetwork Docs
CLaser Class Reference

#include <laser.h>

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

Public Member Functions

 CLaser (CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEnergy, int Owner, int Type)
 
void Tick () override
 
const vec2GetFrom ()
 
const int & GetOwner ()
 
const int & GetEvalTick ()
 
 CLaser (CGameWorld *pGameWorld, int Id, CLaserData *pLaser)
 
bool Match (CLaser *pLaser)
 
CLaserData GetData () const
 
 CLaser (CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEnergy, int Owner, int Type)
 
virtual void Reset () override
 
virtual void Tick () override
 
virtual void TickPaused () override
 
virtual void Snap (int SnappingClient) override
 
virtual void SwapClients (int Client1, int Client2) override
 
virtual int GetOwnerId () const 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 ()
 
CTuningParamsTuning ()
 
CTuningParamsTuningList ()
 
CTuningParamsGetTuning (int i)
 
class CCollisionCollision ()
 
CEntityTypeNext ()
 
CEntityTypePrev ()
 
const vec2GetPos () const
 
float GetProximityRadius () const
 
void Destroy ()
 
virtual void PreTick ()
 
virtual void Tick ()
 
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 ()
 
CTuningParamsTuning ()
 
CTuningParamsTuningList ()
 
CTuningParamsGetTuning (int i)
 
class CConfigConfig ()
 
class CGameContextGameServer ()
 
class IServerServer ()
 
CCollisionCollision ()
 
CEntityTypeNext ()
 
CEntityTypePrev ()
 
const vec2GetPos () const
 
float GetProximityRadius () const
 
virtual void Destroy ()
 
virtual void Reset ()
 
virtual void Tick ()
 
virtual void TickDeferred ()
 
virtual void TickPaused ()
 
virtual void Snap (int SnappingClient)
 
virtual void PostSnap ()
 
virtual void SwapClients (int Client1, int Client2)
 
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)
 
bool GetNearestAirPos (vec2 Pos, vec2 PrevPos, vec2 *pOutPos)
 
bool GetNearestAirPosPlayer (vec2 PlayerPos, vec2 *pOutPos)
 

Protected Member Functions

bool HitCharacter (vec2 From, vec2 To)
 
void DoBounce ()
 
bool HitCharacter (vec2 From, vec2 To)
 
void DoBounce ()
 

Private Attributes

vec2 m_From
 
vec2 m_Dir
 
float m_Energy
 
int m_Bounces
 
int m_EvalTick
 
int m_Owner
 
bool m_ZeroEnergyBounceInLastTick
 
vec2 m_PrevPos
 
int m_Type
 
int m_TuneZone
 
vec2 m_TelePos
 
bool m_WasTele
 
CClientMask m_TeamMask
 
bool m_TeleportCancelled
 
bool m_IsBlueTeleport
 
bool m_BelongsToPracticeTeam
 

Friends

class CGameWorld
 

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
 

Constructor & Destructor Documentation

◆ CLaser() [1/3]

CLaser::CLaser ( CGameWorld pGameWorld,
vec2  Pos,
vec2  Direction,
float  StartEnergy,
int  Owner,
int  Type 
)

◆ CLaser() [2/3]

CLaser::CLaser ( CGameWorld pGameWorld,
int  Id,
CLaserData pLaser 
)

◆ CLaser() [3/3]

CLaser::CLaser ( CGameWorld pGameWorld,
vec2  Pos,
vec2  Direction,
float  StartEnergy,
int  Owner,
int  Type 
)

Member Function Documentation

◆ DoBounce() [1/2]

void CLaser::DoBounce ( )
protected

◆ DoBounce() [2/2]

void CLaser::DoBounce ( )
protected

◆ GetData()

CLaserData CLaser::GetData ( ) const

◆ GetEvalTick()

const int & CLaser::GetEvalTick ( )
inline

◆ GetFrom()

const vec2 & CLaser::GetFrom ( )
inline

◆ GetOwner()

const int & CLaser::GetOwner ( )
inline

◆ GetOwnerId()

virtual int CLaser::GetOwnerId ( ) const
inlineoverridevirtual

Reimplemented from CEntity.

◆ HitCharacter() [1/2]

bool CLaser::HitCharacter ( vec2  From,
vec2  To 
)
protected

◆ HitCharacter() [2/2]

bool CLaser::HitCharacter ( vec2  From,
vec2  To 
)
protected

◆ Match()

bool CLaser::Match ( CLaser pLaser)

◆ Reset()

void CLaser::Reset ( )
overridevirtual

Reimplemented from CEntity.

◆ Snap()

void CLaser::Snap ( int  SnappingClient)
overridevirtual

Reimplemented from CEntity.

◆ SwapClients()

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

Reimplemented from CEntity.

◆ Tick() [1/2]

void CLaser::Tick ( )
overridevirtual

Reimplemented from CEntity.

◆ Tick() [2/2]

virtual void CLaser::Tick ( )
overridevirtual

Reimplemented from CEntity.

◆ TickPaused()

void CLaser::TickPaused ( )
overridevirtual

Reimplemented from CEntity.

Friends And Related Function Documentation

◆ CGameWorld

friend class CGameWorld
friend

Member Data Documentation

◆ m_BelongsToPracticeTeam

bool CLaser::m_BelongsToPracticeTeam
private

◆ m_Bounces

int CLaser::m_Bounces
private

◆ m_Dir

vec2 CLaser::m_Dir
private

◆ m_Energy

float CLaser::m_Energy
private

◆ m_EvalTick

int CLaser::m_EvalTick
private

◆ m_From

vec2 CLaser::m_From
private

◆ m_IsBlueTeleport

bool CLaser::m_IsBlueTeleport
private

◆ m_Owner

int CLaser::m_Owner
private

◆ m_PrevPos

vec2 CLaser::m_PrevPos
private

◆ m_TeamMask

CClientMask CLaser::m_TeamMask
private

◆ m_TeleportCancelled

bool CLaser::m_TeleportCancelled
private

◆ m_TelePos

vec2 CLaser::m_TelePos
private

◆ m_TuneZone

int CLaser::m_TuneZone
private

◆ m_Type

int CLaser::m_Type
private

◆ m_WasTele

bool CLaser::m_WasTele
private

◆ m_ZeroEnergyBounceInLastTick

bool CLaser::m_ZeroEnergyBounceInLastTick
private

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