DDraceNetwork Docs
CGameWorld Class Reference

#include <gameworld.h>

Collaboration diagram for CGameWorld:
[legend]

Public Types

enum  {
  ENTTYPE_PROJECTILE = 0 , ENTTYPE_LASER , ENTTYPE_DOOR , ENTTYPE_DRAGGER ,
  ENTTYPE_LIGHT , ENTTYPE_GUN , ENTTYPE_PLASMA , ENTTYPE_PICKUP ,
  ENTTYPE_FLAG , ENTTYPE_CHARACTER , NUM_ENTTYPES
}
 
enum  {
  ENTTYPE_PROJECTILE = 0 , ENTTYPE_LASER , ENTTYPE_PICKUP , ENTTYPE_FLAG ,
  ENTTYPE_CHARACTER , NUM_ENTTYPES
}
 

Public Member Functions

 CGameWorld ()
 
 ~CGameWorld ()
 
CEntityFindFirst (int Type)
 
CEntityFindLast (int Type)
 
int FindEntities (vec2 Pos, float Radius, CEntity **ppEnts, int Max, int Type)
 
CCharacterIntersectCharacter (vec2 Pos0, vec2 Pos1, float Radius, vec2 &NewPos, const CCharacter *pNotThis=nullptr, int CollideWith=-1, const CCharacter *pThisOnly=nullptr)
 
void InsertEntity (CEntity *pEntity, bool Last=false)
 
void RemoveEntity (CEntity *pEntity)
 
void RemoveCharacter (CCharacter *pChar)
 
void Tick ()
 
void ReleaseHooked (int ClientId)
 
std::vector< CCharacter * > IntersectedCharacters (vec2 Pos0, vec2 Pos1, float Radius, const CEntity *pNotThis=nullptr)
 
int GameTick ()
 
int GameTickSpeed ()
 
CCollisionCollision ()
 
CTeamsCoreTeams ()
 
std::vector< SSwitchers > & Switchers ()
 
CTuningParamsTuning ()
 
CEntityGetEntity (int Id, int EntityType)
 
CCharacterGetCharacterById (int Id)
 
void CreateExplosion (vec2 Pos, int Owner, int Weapon, bool NoDamage, int ActivatedTeam, CClientMask Mask)
 
bool IsLocalTeam (int OwnerId) const
 
void OnModified () const
 
void NetObjBegin (CTeamsCore Teams, int LocalClientId)
 
void NetCharAdd (int ObjId, CNetObj_Character *pChar, CNetObj_DDNetCharacter *pExtended, int GameTeam, bool IsLocal)
 
void NetObjAdd (int ObjId, int ObjType, const void *pObjData, const CNetObj_EntityEx *pDataEx)
 
void NetObjEnd ()
 
void CopyWorld (CGameWorld *pFrom)
 
CEntityFindMatch (int ObjId, int ObjType, const void *pObjData)
 
void Clear ()
 
CTuningParamsTuningList ()
 
CTuningParamsGetTuning (int i)
 
class CGameContextGameServer ()
 
class CConfigConfig ()
 
class IServerServer ()
 
 CGameWorld ()
 
 ~CGameWorld ()
 
void SetGameServer (CGameContext *pGameServer)
 
CEntityFindFirst (int Type)
 
int FindEntities (vec2 Pos, float Radius, CEntity **ppEnts, int Max, int Type)
 
CCharacterIntersectCharacter (vec2 Pos0, vec2 Pos1, float Radius, vec2 &NewPos, const CCharacter *pNotThis=nullptr, int CollideWith=-1, const CCharacter *pThisOnly=nullptr)
 
CCharacterClosestCharacter (vec2 Pos, float Radius, const CEntity *pNotThis)
 
void InsertEntity (CEntity *pEntity)
 
void RemoveEntity (CEntity *pEntity)
 
void RemoveEntitiesFromPlayer (int PlayerId)
 
void RemoveEntitiesFromPlayers (int PlayerIds[], int NumPlayers)
 
void Snap (int SnappingClient)
 
void PostSnap ()
 
void Tick ()
 
void SwapClients (int Client1, int Client2)
 
ESaveResult BlocksSave (int ClientId)
 
void ReleaseHooked (int ClientId)
 
std::vector< CCharacter * > IntersectedCharacters (vec2 Pos0, vec2 Pos1, float Radius, const CEntity *pNotThis=nullptr)
 
CTuningParamsTuning ()
 
CTuningParamsTuningList ()
 
CTuningParamsGetTuning (int i)
 

Public Attributes

CWorldCore m_Core
 
CTeamsCore m_Teams
 
int m_GameTick
 
CCollisionm_pCollision
 
struct {
   bool   m_IsDDRace
 
   bool   m_IsVanilla
 
   bool   m_IsFNG
 
   bool   m_InfiniteAmmo
 
   bool   m_PredictTiles
 
   int   m_PredictFreeze
 
   bool   m_PredictWeapons
 
   bool   m_PredictDDRace
 
   bool   m_IsSolo
 
   bool   m_UseTuneZones
 
   bool   m_BugDDRaceInput
 
   bool   m_NoWeakHookAndBounce
 
m_WorldConfig
 
bool m_IsValidCopy
 
CGameWorldm_pParent
 
CGameWorldm_pChild
 
int m_LocalClientId
 
CTuningParamsm_pTuningList
 
bool m_ResetRequested
 
bool m_Paused
 

Private Member Functions

void RemoveEntities ()
 
void Reset ()
 
void RemoveEntities ()
 

Private Attributes

CEntitym_pNextTraverseEntity = nullptr
 
CEntitym_apFirstEntityTypes [NUM_ENTTYPES]
 
CCharacterm_apCharacters [MAX_CLIENTS]
 
class CGameContextm_pGameServer
 
class CConfigm_pConfig
 
class IServerm_pServer
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ENTTYPE_PROJECTILE 
ENTTYPE_LASER 
ENTTYPE_DOOR 
ENTTYPE_DRAGGER 
ENTTYPE_LIGHT 
ENTTYPE_GUN 
ENTTYPE_PLASMA 
ENTTYPE_PICKUP 
ENTTYPE_FLAG 
ENTTYPE_CHARACTER 
NUM_ENTTYPES 

◆ anonymous enum

anonymous enum
Enumerator
ENTTYPE_PROJECTILE 
ENTTYPE_LASER 
ENTTYPE_PICKUP 
ENTTYPE_FLAG 
ENTTYPE_CHARACTER 
NUM_ENTTYPES 

Constructor & Destructor Documentation

◆ CGameWorld() [1/2]

CGameWorld::CGameWorld ( )

◆ ~CGameWorld() [1/2]

CGameWorld::~CGameWorld ( )

◆ CGameWorld() [2/2]

CGameWorld::CGameWorld ( )

◆ ~CGameWorld() [2/2]

CGameWorld::~CGameWorld ( )

Member Function Documentation

◆ BlocksSave()

ESaveResult CGameWorld::BlocksSave ( int  ClientId)

◆ Clear()

void CGameWorld::Clear ( )

◆ ClosestCharacter()

CCharacter * CGameWorld::ClosestCharacter ( vec2  Pos,
float  Radius,
const CEntity pNotThis 
)

◆ Collision()

CCollision * CGameWorld::Collision ( )
inline

◆ Config()

class CConfig * CGameWorld::Config ( )
inline

◆ CopyWorld()

void CGameWorld::CopyWorld ( CGameWorld pFrom)

◆ CreateExplosion()

void CGameWorld::CreateExplosion ( vec2  Pos,
int  Owner,
int  Weapon,
bool  NoDamage,
int  ActivatedTeam,
CClientMask  Mask 
)

◆ FindEntities() [1/2]

int CGameWorld::FindEntities ( vec2  Pos,
float  Radius,
CEntity **  ppEnts,
int  Max,
int  Type 
)

◆ FindEntities() [2/2]

int CGameWorld::FindEntities ( vec2  Pos,
float  Radius,
CEntity **  ppEnts,
int  Max,
int  Type 
)

◆ FindFirst() [1/2]

CEntity * CGameWorld::FindFirst ( int  Type)

◆ FindFirst() [2/2]

CEntity * CGameWorld::FindFirst ( int  Type)

◆ FindLast()

CEntity * CGameWorld::FindLast ( int  Type)

◆ FindMatch()

CEntity * CGameWorld::FindMatch ( int  ObjId,
int  ObjType,
const void *  pObjData 
)

◆ GameServer()

class CGameContext * CGameWorld::GameServer ( )
inline

◆ GameTick()

int CGameWorld::GameTick ( )
inline

◆ GameTickSpeed()

int CGameWorld::GameTickSpeed ( )
inline

◆ GetCharacterById()

CCharacter * CGameWorld::GetCharacterById ( int  Id)
inline

◆ GetEntity()

CEntity * CGameWorld::GetEntity ( int  Id,
int  EntityType 
)

◆ GetTuning() [1/2]

CTuningParams * CGameWorld::GetTuning ( int  i)
inline

◆ GetTuning() [2/2]

CTuningParams * CGameWorld::GetTuning ( int  i)
inline

◆ InsertEntity() [1/2]

void CGameWorld::InsertEntity ( CEntity pEntity)

◆ InsertEntity() [2/2]

void CGameWorld::InsertEntity ( CEntity pEntity,
bool  Last = false 
)

◆ IntersectCharacter() [1/2]

CCharacter * CGameWorld::IntersectCharacter ( vec2  Pos0,
vec2  Pos1,
float  Radius,
vec2 NewPos,
const CCharacter pNotThis = nullptr,
int  CollideWith = -1,
const CCharacter pThisOnly = nullptr 
)

◆ IntersectCharacter() [2/2]

CCharacter * CGameWorld::IntersectCharacter ( vec2  Pos0,
vec2  Pos1,
float  Radius,
vec2 NewPos,
const CCharacter pNotThis = nullptr,
int  CollideWith = -1,
const CCharacter pThisOnly = nullptr 
)

◆ IntersectedCharacters() [1/2]

std::vector< CCharacter * > CGameWorld::IntersectedCharacters ( vec2  Pos0,
vec2  Pos1,
float  Radius,
const CEntity pNotThis = nullptr 
)

◆ IntersectedCharacters() [2/2]

std::vector< CCharacter * > CGameWorld::IntersectedCharacters ( vec2  Pos0,
vec2  Pos1,
float  Radius,
const CEntity pNotThis = nullptr 
)

◆ IsLocalTeam()

bool CGameWorld::IsLocalTeam ( int  OwnerId) const

◆ NetCharAdd()

void CGameWorld::NetCharAdd ( int  ObjId,
CNetObj_Character pChar,
CNetObj_DDNetCharacter pExtended,
int  GameTeam,
bool  IsLocal 
)

◆ NetObjAdd()

void CGameWorld::NetObjAdd ( int  ObjId,
int  ObjType,
const void *  pObjData,
const CNetObj_EntityEx pDataEx 
)

◆ NetObjBegin()

void CGameWorld::NetObjBegin ( CTeamsCore  Teams,
int  LocalClientId 
)

◆ NetObjEnd()

void CGameWorld::NetObjEnd ( )

◆ OnModified()

void CGameWorld::OnModified ( ) const

◆ PostSnap()

void CGameWorld::PostSnap ( )

◆ ReleaseHooked() [1/2]

void CGameWorld::ReleaseHooked ( int  ClientId)

◆ ReleaseHooked() [2/2]

void CGameWorld::ReleaseHooked ( int  ClientId)

◆ RemoveCharacter()

void CGameWorld::RemoveCharacter ( CCharacter pChar)

◆ RemoveEntities() [1/2]

void CGameWorld::RemoveEntities ( )
private

◆ RemoveEntities() [2/2]

void CGameWorld::RemoveEntities ( )
private

◆ RemoveEntitiesFromPlayer()

void CGameWorld::RemoveEntitiesFromPlayer ( int  PlayerId)

◆ RemoveEntitiesFromPlayers()

void CGameWorld::RemoveEntitiesFromPlayers ( int  PlayerIds[],
int  NumPlayers 
)

◆ RemoveEntity() [1/2]

void CGameWorld::RemoveEntity ( CEntity pEntity)

◆ RemoveEntity() [2/2]

void CGameWorld::RemoveEntity ( CEntity pEntity)

◆ Reset()

void CGameWorld::Reset ( )
private

◆ Server()

class IServer * CGameWorld::Server ( )
inline

◆ SetGameServer()

void CGameWorld::SetGameServer ( CGameContext pGameServer)

◆ Snap()

void CGameWorld::Snap ( int  SnappingClient)

◆ SwapClients()

void CGameWorld::SwapClients ( int  Client1,
int  Client2 
)

◆ Switchers()

std::vector< SSwitchers > & CGameWorld::Switchers ( )
inline

◆ Teams()

CTeamsCore * CGameWorld::Teams ( )
inline

◆ Tick() [1/2]

void CGameWorld::Tick ( )

◆ Tick() [2/2]

void CGameWorld::Tick ( )

◆ Tuning() [1/2]

CTuningParams * CGameWorld::Tuning ( )

◆ Tuning() [2/2]

CTuningParams * CGameWorld::Tuning ( )

◆ TuningList() [1/2]

CTuningParams * CGameWorld::TuningList ( )
inline

◆ TuningList() [2/2]

CTuningParams * CGameWorld::TuningList ( )
inline

Member Data Documentation

◆ m_apCharacters

CCharacter* CGameWorld::m_apCharacters[MAX_CLIENTS]
private

◆ m_apFirstEntityTypes

CEntity * CGameWorld::m_apFirstEntityTypes
private

◆ m_BugDDRaceInput

bool CGameWorld::m_BugDDRaceInput

◆ m_Core

CWorldCore CGameWorld::m_Core

◆ m_GameTick

int CGameWorld::m_GameTick

◆ m_InfiniteAmmo

bool CGameWorld::m_InfiniteAmmo

◆ m_IsDDRace

bool CGameWorld::m_IsDDRace

◆ m_IsFNG

bool CGameWorld::m_IsFNG

◆ m_IsSolo

bool CGameWorld::m_IsSolo

◆ m_IsValidCopy

bool CGameWorld::m_IsValidCopy

◆ m_IsVanilla

bool CGameWorld::m_IsVanilla

◆ m_LocalClientId

int CGameWorld::m_LocalClientId

◆ m_NoWeakHookAndBounce

bool CGameWorld::m_NoWeakHookAndBounce

◆ m_Paused

bool CGameWorld::m_Paused

◆ m_pChild

CGameWorld* CGameWorld::m_pChild

◆ m_pCollision

CCollision* CGameWorld::m_pCollision

◆ m_pConfig

class CConfig* CGameWorld::m_pConfig
private

◆ m_pGameServer

class CGameContext* CGameWorld::m_pGameServer
private

◆ m_pNextTraverseEntity

CEntity * CGameWorld::m_pNextTraverseEntity = nullptr
private

◆ m_pParent

CGameWorld* CGameWorld::m_pParent

◆ m_PredictDDRace

bool CGameWorld::m_PredictDDRace

◆ m_PredictFreeze

int CGameWorld::m_PredictFreeze

◆ m_PredictTiles

bool CGameWorld::m_PredictTiles

◆ m_PredictWeapons

bool CGameWorld::m_PredictWeapons

◆ m_pServer

class IServer* CGameWorld::m_pServer
private

◆ m_pTuningList

CTuningParams * CGameWorld::m_pTuningList

◆ m_ResetRequested

bool CGameWorld::m_ResetRequested

◆ m_Teams

CTeamsCore CGameWorld::m_Teams

◆ m_UseTuneZones

bool CGameWorld::m_UseTuneZones

◆ 

struct { ... } CGameWorld::m_WorldConfig

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