![]() |
DDraceNetwork Documentation
|
#include <gameworld.h>
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 () | |
| void | Init (CCollision *pCollision, CTuningParams *pTuningList, const CMapBugs *pMapBugs) |
| CEntity * | FindFirst (int Type) |
| CEntity * | FindLast (int Type) |
| int | FindEntities (vec2 Pos, float Radius, CEntity **ppEnts, int Max, int Type) |
| CCharacter * | IntersectCharacter (vec2 Pos0, vec2 Pos1, float Radius, vec2 &NewPos, const CCharacter *pNotThis=nullptr, int CollideWith=-1, const CCharacter *pThisOnly=nullptr) |
| CEntity * | IntersectEntity (vec2 Pos0, vec2 Pos1, float Radius, int Type, vec2 &NewPos, const CEntity *pNotThis=nullptr, int CollideWith=-1, const CEntity *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 () const |
| int | GameTickSpeed () const |
| const CCollision * | Collision () const |
| CCollision * | Collision () |
| CTeamsCore * | Teams () |
| std::vector< SSwitchers > & | Switchers () |
| CEntity * | GetEntity (int Id, int EntityType) |
| CCharacter * | GetCharacterById (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) |
| CEntity * | FindMatch (int ObjId, int ObjType, const void *pObjData) |
| void | Clear () |
| const CTuningParams * | TuningList () const |
| CTuningParams * | TuningList () |
| const CTuningParams * | GlobalTuning () const |
| CTuningParams * | GlobalTuning () |
| const CTuningParams * | GetTuning (int i) const |
| CTuningParams * | GetTuning (int i) |
| bool | EmulateBug (int Bug) const |
| class CGameContext * | GameServer () |
| class CConfig * | Config () |
| class IServer * | Server () |
| CGameWorld () | |
| ~CGameWorld () | |
| void | SetGameServer (CGameContext *pGameServer) |
| void | Init (CCollision *pCollision, CTuningParams *pTuningList) |
| CEntity * | FindFirst (int Type) |
| int | FindEntities (vec2 Pos, float Radius, CEntity **ppEnts, int Max, int Type) |
| CCharacter * | IntersectCharacter (vec2 Pos0, vec2 Pos1, float Radius, vec2 &NewPos, const CCharacter *pNotThis=nullptr, int CollideWith=-1, const CCharacter *pThisOnly=nullptr) |
| CEntity * | IntersectEntity (vec2 Pos0, vec2 Pos1, float Radius, int Type, vec2 &NewPos, const CEntity *pNotThis=nullptr, int CollideWith=-1, const CEntity *pThisOnly=nullptr) |
| CCharacter * | ClosestCharacter (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 | 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) |
| const CTuningParams * | TuningList () const |
| CTuningParams * | TuningList () |
| const CTuningParams * | GetTuning (int i) const |
| CTuningParams * | GetTuning (int i) |
Public Attributes | |
| CWorldCore | m_Core |
| CTeamsCore | m_Teams |
| int | m_GameTick |
| 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 |
| CGameWorld * | m_pParent |
| CGameWorld * | m_pChild |
| int | m_LocalClientId |
| bool | m_ResetRequested |
| bool | m_Paused |
Private Member Functions | |
| void | RemoveEntities () |
| void | Reset () |
| void | RemoveEntities () |
Private Attributes | |
| CEntity * | m_pNextTraverseEntity = nullptr |
| CEntity * | m_apFirstEntityTypes [NUM_ENTTYPES] |
| CCharacter * | m_apCharacters [MAX_CLIENTS] |
| CCollision * | m_pCollision |
| CTuningParams * | m_pTuningList |
| const CMapBugs * | m_pMapBugs |
| class CGameContext * | m_pGameServer |
| class CConfig * | m_pConfig |
| class IServer * | m_pServer |
| anonymous enum |
| anonymous enum |
| CGameWorld::CGameWorld | ( | ) |
| CGameWorld::~CGameWorld | ( | ) |
| CGameWorld::CGameWorld | ( | ) |
| CGameWorld::~CGameWorld | ( | ) |
| ESaveResult CGameWorld::BlocksSave | ( | int | ClientId | ) |
| void CGameWorld::Clear | ( | ) |
| CCharacter * CGameWorld::ClosestCharacter | ( | vec2 | Pos, |
| float | Radius, | ||
| const CEntity * | pNotThis ) |
|
inline |
|
inline |
|
inline |
| void CGameWorld::CopyWorld | ( | CGameWorld * | pFrom | ) |
| void CGameWorld::CreateExplosion | ( | vec2 | Pos, |
| int | Owner, | ||
| int | Weapon, | ||
| bool | NoDamage, | ||
| int | ActivatedTeam, | ||
| CClientMask | Mask ) |
| bool CGameWorld::EmulateBug | ( | int | Bug | ) | const |
| CEntity * CGameWorld::FindFirst | ( | int | Type | ) |
| CEntity * CGameWorld::FindFirst | ( | int | Type | ) |
| CEntity * CGameWorld::FindLast | ( | int | Type | ) |
| CEntity * CGameWorld::FindMatch | ( | int | ObjId, |
| int | ObjType, | ||
| const void * | pObjData ) |
|
inline |
|
inline |
|
inline |
|
inline |
| CEntity * CGameWorld::GetEntity | ( | int | Id, |
| int | EntityType ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void CGameWorld::Init | ( | CCollision * | pCollision, |
| CTuningParams * | pTuningList ) |
| void CGameWorld::Init | ( | CCollision * | pCollision, |
| CTuningParams * | pTuningList, | ||
| const CMapBugs * | pMapBugs ) |
| void CGameWorld::InsertEntity | ( | CEntity * | pEntity | ) |
| void CGameWorld::InsertEntity | ( | CEntity * | pEntity, |
| bool | Last = false ) |
| CCharacter * CGameWorld::IntersectCharacter | ( | vec2 | Pos0, |
| vec2 | Pos1, | ||
| float | Radius, | ||
| vec2 & | NewPos, | ||
| const CCharacter * | pNotThis = nullptr, | ||
| int | CollideWith = -1, | ||
| const CCharacter * | pThisOnly = nullptr ) |
| CCharacter * CGameWorld::IntersectCharacter | ( | vec2 | Pos0, |
| vec2 | Pos1, | ||
| float | Radius, | ||
| vec2 & | NewPos, | ||
| const CCharacter * | pNotThis = nullptr, | ||
| int | CollideWith = -1, | ||
| const CCharacter * | pThisOnly = nullptr ) |
Finds the CCharacter that intersects the line.
| Pos0 | Start position |
| Pos1 | End position |
| Radius | How far from the line the CCharacter is allowed to be |
| NewPos | Intersection position |
| pNotThis | Character to ignore intersecting with |
| CollideWith | Only find entities that can collide with that Client Id (pass -1 to ignore this check) |
| pThisOnly | Only search this specific character and ignore all others |
| std::vector< CCharacter * > CGameWorld::IntersectedCharacters | ( | vec2 | Pos0, |
| vec2 | Pos1, | ||
| float | Radius, | ||
| const CEntity * | pNotThis = nullptr ) |
| std::vector< CCharacter * > CGameWorld::IntersectedCharacters | ( | vec2 | Pos0, |
| vec2 | Pos1, | ||
| float | Radius, | ||
| const CEntity * | pNotThis = nullptr ) |
| CEntity * CGameWorld::IntersectEntity | ( | vec2 | Pos0, |
| vec2 | Pos1, | ||
| float | Radius, | ||
| int | Type, | ||
| vec2 & | NewPos, | ||
| const CEntity * | pNotThis = nullptr, | ||
| int | CollideWith = -1, | ||
| const CEntity * | pThisOnly = nullptr ) |
| CEntity * CGameWorld::IntersectEntity | ( | vec2 | Pos0, |
| vec2 | Pos1, | ||
| float | Radius, | ||
| int | Type, | ||
| vec2 & | NewPos, | ||
| const CEntity * | pNotThis = nullptr, | ||
| int | CollideWith = -1, | ||
| const CEntity * | pThisOnly = nullptr ) |
Finds the CEntity that intersects the line.
| Pos0 | Start position |
| Pos1 | End position |
| Radius | How far from the line the CEntity is allowed to be |
| Type | Type of the entity to intersect |
| NewPos | Intersection position |
| pNotThis | Entity to ignore intersecting with |
| CollideWith | Only find entities that can collide with that Client Id (pass -1 to ignore this check) |
| pThisOnly | Only search this specific entity and ignore all others |
| bool CGameWorld::IsLocalTeam | ( | int | OwnerId | ) | const |
| void CGameWorld::NetCharAdd | ( | int | ObjId, |
| CNetObj_Character * | pChar, | ||
| CNetObj_DDNetCharacter * | pExtended, | ||
| int | GameTeam, | ||
| bool | IsLocal ) |
| void CGameWorld::NetObjAdd | ( | int | ObjId, |
| int | ObjType, | ||
| const void * | pObjData, | ||
| const CNetObj_EntityEx * | pDataEx ) |
| void CGameWorld::NetObjBegin | ( | CTeamsCore | Teams, |
| int | LocalClientId ) |
| void CGameWorld::NetObjEnd | ( | ) |
| void CGameWorld::OnModified | ( | ) | const |
| void CGameWorld::ReleaseHooked | ( | int | ClientId | ) |
| void CGameWorld::ReleaseHooked | ( | int | ClientId | ) |
| void CGameWorld::RemoveCharacter | ( | CCharacter * | pChar | ) |
|
private |
|
private |
| void CGameWorld::RemoveEntitiesFromPlayer | ( | int | PlayerId | ) |
| void CGameWorld::RemoveEntitiesFromPlayers | ( | int | PlayerIds[], |
| int | NumPlayers ) |
| void CGameWorld::RemoveEntity | ( | CEntity * | pEntity | ) |
| void CGameWorld::RemoveEntity | ( | CEntity * | pEntity | ) |
|
private |
|
inline |
| void CGameWorld::SetGameServer | ( | CGameContext * | pGameServer | ) |
| void CGameWorld::Snap | ( | int | SnappingClient | ) |
| void CGameWorld::SwapClients | ( | int | Client1, |
| int | Client2 ) |
|
inline |
|
inline |
| void CGameWorld::Tick | ( | ) |
| void CGameWorld::Tick | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
| bool CGameWorld::m_BugDDRaceInput |
| CWorldCore CGameWorld::m_Core |
| int CGameWorld::m_GameTick |
| bool CGameWorld::m_InfiniteAmmo |
| bool CGameWorld::m_IsDDRace |
| bool CGameWorld::m_IsFNG |
| bool CGameWorld::m_IsSolo |
| bool CGameWorld::m_IsValidCopy |
| bool CGameWorld::m_IsVanilla |
| int CGameWorld::m_LocalClientId |
| bool CGameWorld::m_NoWeakHookAndBounce |
| bool CGameWorld::m_Paused |
| CGameWorld* CGameWorld::m_pChild |
|
private |
|
private |
|
private |
|
private |
|
private |
| CGameWorld* CGameWorld::m_pParent |
| bool CGameWorld::m_PredictDDRace |
| int CGameWorld::m_PredictFreeze |
| bool CGameWorld::m_PredictTiles |
| bool CGameWorld::m_PredictWeapons |
|
private |
|
private |
| bool CGameWorld::m_ResetRequested |
| CTeamsCore CGameWorld::m_Teams |
| bool CGameWorld::m_UseTuneZones |
| struct { ... } CGameWorld::m_WorldConfig |