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

#include <plasma.h>

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

Public Member Functions

 CPlasma (CGameWorld *pGameWorld, int Id, const CLaserData *pData)
bool Match (const CPlasma *pPlasma) const
void Read (const CLaserData *pData)
void Reset ()
void Tick () override
 CPlasma (CGameWorld *pGameWorld, vec2 Pos, vec2 Dir, bool Freeze, bool Explosive, int ForClientId)
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 Move ()
bool HitCharacter (CCharacter *pTarget)
bool HitObstacle (CCharacter *pTarget)
void Move ()
bool HitCharacter (CCharacter *pTarget)
bool HitObstacle (CCharacter *pTarget)

Private Attributes

vec2 m_Core
bool m_Freeze
bool m_Explosive
int m_ForClientId
int m_EvalTick
int m_LifeTime
int m_Freeze

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

Plasma Bullets are projectiles fired from turrets at a specific target

When hitting a tee, plasma bullets can either freeze or unfreeze the player Also, plasma projectiles can explode on impact. However, the player affected by the explosion is not necessarily the one the plasma collided with, but if the affected player is not a solo player, then the team-mate with the lowest ClientId within the explosion range. Furthermore, the affected player does not feel the explosion at the point of impact but at the last position of the plasma bullet. The same applies if a plasma bullet explodes due to a collision with a laser stopper or a solid block Plasma bullets move every tick in the assigned direction and then accelerate by the factor PLASMA_ACCEL Plasma bullets can explode twice if they would hit both a player and an obstacle in the next movement step Plasma bullets will stop existing as soon as:

  • The player they were created for do no longer exist
  • They have had a collision with a player, a solid block or a laser stopper
  • Their life time of 1.5 seconds has expired

Constructor & Destructor Documentation

◆ CPlasma() [1/2]

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

◆ CPlasma() [2/2]

CPlasma::CPlasma ( CGameWorld * pGameWorld,
vec2 Pos,
vec2 Dir,
bool Freeze,
bool Explosive,
int ForClientId )

Member Function Documentation

◆ HitCharacter() [1/2]

bool CPlasma::HitCharacter ( CCharacter * pTarget)
private

◆ HitCharacter() [2/2]

bool CPlasma::HitCharacter ( CCharacter * pTarget)
private

◆ HitObstacle() [1/2]

bool CPlasma::HitObstacle ( CCharacter * pTarget)
private

◆ HitObstacle() [2/2]

bool CPlasma::HitObstacle ( CCharacter * pTarget)
private

◆ Match()

bool CPlasma::Match ( const CPlasma * pPlasma) const

◆ Move() [1/2]

void CPlasma::Move ( )
private

◆ Move() [2/2]

void CPlasma::Move ( )
private

◆ Read()

void CPlasma::Read ( const CLaserData * pData)

◆ Reset() [1/2]

void CPlasma::Reset ( )
virtual

Reimplemented from CEntity.

◆ Reset() [2/2]

void CPlasma::Reset ( )
overridevirtual

Reimplemented from CEntity.

◆ Snap()

void CPlasma::Snap ( int SnappingClient)
overridevirtual

Reimplemented from CEntity.

◆ SwapClients()

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

Reimplemented from CEntity.

◆ Tick() [1/2]

void CPlasma::Tick ( )
overridevirtual

Reimplemented from CEntity.

◆ Tick() [2/2]

void CPlasma::Tick ( )
overridevirtual

Reimplemented from CEntity.

Member Data Documentation

◆ m_Core

vec2 CPlasma::m_Core
private

◆ m_EvalTick

int CPlasma::m_EvalTick
private

◆ m_Explosive

bool CPlasma::m_Explosive
private

◆ m_ForClientId

int CPlasma::m_ForClientId
private

◆ m_Freeze [1/2]

bool CPlasma::m_Freeze
private

◆ m_Freeze [2/2]

int CPlasma::m_Freeze
private

◆ m_LifeTime

int CPlasma::m_LifeTime
private

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