![]() |
DDNet documentation
|
#include <gamecontroller.h>
Classes | |
| struct | CSpawnEval |
| class | CFinishTime |
Public Member Functions | |
| IGameController (class CGameContext *pGameServer) | |
| virtual | ~IGameController () |
| virtual int | OnCharacterDeath (class CCharacter *pVictim, class CPlayer *pKiller, int Weapon) |
| virtual void | OnCharacterSpawn (class CCharacter *pChr) |
| virtual void | HandleCharacterTiles (class CCharacter *pChr, int MapIndex) |
| virtual void | SetArmorProgress (CCharacter *pCharacter, int Progress) |
| virtual bool | OnEntity (int Index, int x, int y, int Layer, int Flags, bool Initial, int Number=0) |
| virtual void | OnPlayerConnect (class CPlayer *pPlayer) |
| virtual void | OnPlayerDisconnect (class CPlayer *pPlayer, const char *pReason) |
| virtual void | OnReset () |
| virtual void | DoWarmup (int Seconds) |
| void | SetGamePaused (bool Paused) |
| bool | IsGamePaused () const |
| virtual void | StartRound () |
| virtual void | EndRound () |
| void | ChangeMap (const char *pToMap) |
| virtual void | Tick () |
| virtual void | Snap (int SnappingClient) |
| virtual int | SnapPlayerScore (int SnappingClient, CPlayer *pPlayer) |
| virtual CFinishTime | SnapPlayerTime (int SnappingClient, CPlayer *pPlayer) |
| virtual CFinishTime | SnapMapBestTime (int SnappingClient) |
| virtual bool | CanSpawn (int Team, vec2 *pOutPos, int ClientId) |
| virtual void | DoTeamChange (class CPlayer *pPlayer, int Team, bool DoChatMsg) |
| int | TileFlagsToPickupFlags (int TileFlags) const |
| virtual bool | IsValidTeam (int Team) |
| virtual const char * | GetTeamName (int Team) |
| virtual int | GetAutoTeam (int NotThisId) |
| virtual bool | CanJoinTeam (int Team, int NotThisId, char *pErrorReason, int ErrorReasonSize) |
| CClientMask | GetMaskForPlayerWorldEvent (int Asker, int ExceptID=-1) |
| bool | IsTeamPlay () const |
| int | GameFlags () const |
| CGameTeams & | Teams () |
Public Attributes | |
| const char * | m_pGameType |
| std::optional< float > | m_CurrentRecord |
| std::shared_ptr< CScoreLoadBestTimeResult > | m_pLoadBestTimeResult |
Protected Types | |
| enum | ESpawnType { SPAWNTYPE_DEFAULT = 0 , SPAWNTYPE_RED , SPAWNTYPE_BLUE , NUM_SPAWNTYPES } |
Protected Member Functions | |
| CGameContext * | GameServer () const |
| CConfig * | Config () |
| IServer * | Server () const |
| void | DoActivityCheck () |
| float | EvaluateSpawnPos (CSpawnEval *pEval, vec2 Pos, int ClientId) |
| void | EvaluateSpawnType (CSpawnEval *pEval, ESpawnType SpawnType, int ClientId) |
| void | ResetGame () |
Protected Attributes | |
| char | m_aMapWish [MAX_MAP_LENGTH] |
| int | m_RoundStartTick |
| int | m_GameOverTick |
| int | m_SuddenDeath |
| int | m_Warmup |
| int | m_RoundCount |
| int | m_GameFlags |
Private Attributes | |
| std::vector< vec2 > | m_avSpawnPoints [NUM_SPAWNTYPES] |
| class CGameContext * | m_pGameServer |
| class CConfig * | m_pConfig |
| class IServer * | m_pServer |
| CGameTeams | m_Teams |
Friends | |
| class | CSaveTeam |
|
protected |
| IGameController::IGameController | ( | class CGameContext * | pGameServer | ) |
|
virtualdefault |
|
virtual |
|
virtual |
| void IGameController::ChangeMap | ( | const char * | pToMap | ) |
|
inlineprotected |
|
protected |
|
virtual |
Reimplemented in CGameControllerDDNet.
|
virtual |
|
virtual |
|
protected |
|
protected |
|
inline |
|
inlineprotected |
|
virtual |
| CClientMask IGameController::GetMaskForPlayerWorldEvent | ( | int | Asker, |
| int | ExceptID = -1 ) |
|
virtual |
|
virtual |
Reimplemented in CGameControllerDDNet.
| bool IGameController::IsGamePaused | ( | ) | const |
|
inline |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in CGameControllerDDNet.
|
virtual |
Reimplemented in CGameControllerDDNet.
|
virtual |
Reimplemented in CGameControllerDDNet.
|
protected |
|
inlineprotected |
|
inlinevirtual |
Reimplemented in CGameControllerDDNet.
| void IGameController::SetGamePaused | ( | bool | Paused | ) |
|
virtual |
|
inlinevirtual |
Snaps the current server record / best time of the current map.
| SnappingClient | Client ID of the player that will receive the snapshot. |
Reimplemented in CGameControllerDDNet.
|
inlinevirtual |
Sets the score value that will be shown in the scoreboard.
| SnappingClient | Client ID of the player that will receive the snapshot. |
| pPlayer | Player that is being snapped. |
Reimplemented in CGameControllerDDNet.
|
inlinevirtual |
Returns the finish time value that will be shown in the scoreboard.
| SnappingClient | Client ID of the player that will receive the snapshot. |
| pPlayer | Player that is being snapped. |
Reimplemented in CGameControllerDDNet.
|
virtual |
|
inline |
|
virtual |
Reimplemented in CGameControllerDDNet, and CGameControllerMod.
| int IGameController::TileFlagsToPickupFlags | ( | int | TileFlags | ) | const |
|
friend |
|
protected |
|
private |
| std::optional<float> IGameController::m_CurrentRecord |
|
protected |
|
protected |
|
private |
|
private |
| const char* IGameController::m_pGameType |
| std::shared_ptr<CScoreLoadBestTimeResult> IGameController::m_pLoadBestTimeResult |
|
private |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |