DDraceNetwork Docs
CProjectile Class Reference

#include <projectile.h>

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

Public Member Functions

 CProjectile (CGameWorld *pGameWorld, int Type, int Owner, vec2 Pos, vec2 Dir, int Span, bool Freeze, bool Explosive, int SoundImpact, int Layer=0, int Number=0)
 
vec2 GetPos (float Time)
 
CProjectileData GetData () const
 
void Tick () override
 
bool Match (CProjectile *pProj)
 
void SetBouncing (int Value)
 
const vec2GetDirection ()
 
const int & GetOwner ()
 
const int & GetStartTick ()
 
 CProjectile (CGameWorld *pGameWorld, int Id, const CProjectileData *pProj)
 
 CProjectile (CGameWorld *pGameWorld, int Type, int Owner, vec2 Pos, vec2 Dir, int Span, bool Freeze, bool Explosive, int SoundImpact, vec2 InitDir, int Layer=0, int Number=0)
 
vec2 GetPos (float Time)
 
void FillInfo (CNetObj_Projectile *pProj)
 
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
 
void SetBouncing (int Value)
 
bool FillExtraInfoLegacy (CNetObj_DDRaceProjectile *pProj)
 
void FillExtraInfo (CNetObj_DDNetProjectile *pProj)
 
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)
 

Private Attributes

vec2 m_Direction
 
int m_LifeSpan
 
int m_Owner
 
int m_Type
 
int m_SoundImpact
 
float m_Force
 
int m_StartTick
 
bool m_Explosive
 
int m_Bouncing
 
bool m_Freeze
 
int m_TuneZone
 
bool m_BelongsToPracticeTeam
 
vec2 m_InitDir
 

Friends

class CGameWorld
 
class CItems
 

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

◆ CProjectile() [1/3]

CProjectile::CProjectile ( CGameWorld pGameWorld,
int  Type,
int  Owner,
vec2  Pos,
vec2  Dir,
int  Span,
bool  Freeze,
bool  Explosive,
int  SoundImpact,
int  Layer = 0,
int  Number = 0 
)

◆ CProjectile() [2/3]

CProjectile::CProjectile ( CGameWorld pGameWorld,
int  Id,
const CProjectileData pProj 
)

◆ CProjectile() [3/3]

CProjectile::CProjectile ( CGameWorld pGameWorld,
int  Type,
int  Owner,
vec2  Pos,
vec2  Dir,
int  Span,
bool  Freeze,
bool  Explosive,
int  SoundImpact,
vec2  InitDir,
int  Layer = 0,
int  Number = 0 
)

Member Function Documentation

◆ FillExtraInfo()

void CProjectile::FillExtraInfo ( CNetObj_DDNetProjectile pProj)

◆ FillExtraInfoLegacy()

bool CProjectile::FillExtraInfoLegacy ( CNetObj_DDRaceProjectile pProj)

◆ FillInfo()

void CProjectile::FillInfo ( CNetObj_Projectile pProj)

◆ GetData()

CProjectileData CProjectile::GetData ( ) const

◆ GetDirection()

const vec2 & CProjectile::GetDirection ( )
inline

◆ GetOwner()

const int & CProjectile::GetOwner ( )
inline

◆ GetOwnerId()

virtual int CProjectile::GetOwnerId ( ) const
inlineoverridevirtual

Reimplemented from CEntity.

◆ GetPos() [1/2]

vec2 CProjectile::GetPos ( float  Time)

◆ GetPos() [2/2]

vec2 CProjectile::GetPos ( float  Time)

◆ GetStartTick()

const int & CProjectile::GetStartTick ( )
inline

◆ Match()

bool CProjectile::Match ( CProjectile pProj)

◆ Reset()

void CProjectile::Reset ( )
overridevirtual

Reimplemented from CEntity.

◆ SetBouncing() [1/2]

void CProjectile::SetBouncing ( int  Value)

◆ SetBouncing() [2/2]

void CProjectile::SetBouncing ( int  Value)

◆ Snap()

void CProjectile::Snap ( int  SnappingClient)
overridevirtual

Reimplemented from CEntity.

◆ SwapClients()

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

Reimplemented from CEntity.

◆ Tick() [1/2]

void CProjectile::Tick ( )
overridevirtual

Reimplemented from CEntity.

◆ Tick() [2/2]

virtual void CProjectile::Tick ( )
overridevirtual

Reimplemented from CEntity.

◆ TickPaused()

void CProjectile::TickPaused ( )
overridevirtual

Reimplemented from CEntity.

Friends And Related Function Documentation

◆ CGameWorld

friend class CGameWorld
friend

◆ CItems

friend class CItems
friend

Member Data Documentation

◆ m_BelongsToPracticeTeam

bool CProjectile::m_BelongsToPracticeTeam
private

◆ m_Bouncing

int CProjectile::m_Bouncing
private

◆ m_Direction

vec2 CProjectile::m_Direction
private

◆ m_Explosive

bool CProjectile::m_Explosive
private

◆ m_Force

float CProjectile::m_Force
private

◆ m_Freeze

bool CProjectile::m_Freeze
private

◆ m_InitDir

vec2 CProjectile::m_InitDir
private

◆ m_LifeSpan

int CProjectile::m_LifeSpan
private

◆ m_Owner

int CProjectile::m_Owner
private

◆ m_SoundImpact

int CProjectile::m_SoundImpact
private

◆ m_StartTick

int CProjectile::m_StartTick
private

◆ m_TuneZone

int CProjectile::m_TuneZone
private

◆ m_Type

int CProjectile::m_Type
private

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