3#ifndef GAME_SERVER_GAMECONTROLLER_H
4#define GAME_SERVER_GAMECONTROLLER_H
112 virtual bool OnEntity(
int Index,
int x,
int y,
int Layer,
int Flags,
bool Initial,
int Number = 0);
135 virtual void Snap(
int SnappingClient);
138 virtual bool CanSpawn(
int Team,
vec2 *pOutPos,
int DDTeam);
146 virtual bool CanJoinTeam(
int Team,
int NotThisId,
char *pErrorReason,
int ErrorReasonSize);
Definition: character.h:30
Definition: gamecontext.h:79
Definition: gamecontroller.h:19
virtual void Snap(int SnappingClient)
Definition: gamecontroller.cpp:571
void EndRound()
Definition: gamecontroller.cpp:441
virtual void OnPlayerConnect(class CPlayer *pPlayer)
Definition: gamecontroller.cpp:390
CGameTeams m_Teams
Definition: gamecontroller.h:28
virtual void OnPlayerDisconnect(class CPlayer *pPlayer, const char *pReason)
Definition: gamecontroller.cpp:423
virtual const char * GetTeamName(int Team)
Definition: gamecontroller.cpp:456
CClientMask GetMaskForPlayerWorldEvent(int Asker, int ExceptID=-1)
Definition: gamecontroller.cpp:724
virtual void OnReset()
Definition: gamecontroller.cpp:483
class CConfig * m_pConfig
Definition: gamecontroller.h:25
virtual bool CanJoinTeam(int Team, int NotThisId, char *pErrorReason, int ErrorReasonSize)
Definition: gamecontroller.cpp:687
virtual void SetArmorProgress(CCharacter *pCharacer, int Progress)
Definition: gamecontroller.h:98
virtual bool CanSpawn(int Team, vec2 *pOutPos, int DDTeam)
Definition: gamecontroller.cpp:157
std::shared_ptr< CScoreLoadBestTimeResult > m_pLoadBestTimeResult
Definition: gamecontroller.h:156
int m_Warmup
Definition: gamecontroller.h:63
virtual void Tick()
Definition: gamecontroller.cpp:531
virtual void HandleCharacterTiles(class CCharacter *pChr, int MapIndex)
Definition: gamecontroller.cpp:508
void ResetGame()
Definition: gamecontroller.cpp:451
bool m_ForceBalanced
Definition: gamecontroller.h:68
const char * m_pGameType
Definition: gamecontroller.h:71
int m_GameOverTick
Definition: gamecontroller.h:60
bool IsForceBalanced()
Definition: gamecontroller.cpp:521
char m_aMapWish[MAX_MAP_LENGTH]
Definition: gamecontroller.h:57
CConfig * Config()
Definition: gamecontroller.h:32
virtual void OnCharacterSpawn(class CCharacter *pChr)
Definition: gamecontroller.cpp:495
int m_UnbalancedTick
Definition: gamecontroller.h:67
CGameTeams & Teams()
Definition: gamecontroller.h:155
virtual ~IGameController()
virtual bool CanBeMovedOnBalance(int ClientId)
Definition: gamecontroller.cpp:526
virtual void DoTeamChange(class CPlayer *pPlayer, int Team, bool DoChatMsg=true)
Definition: gamecontroller.cpp:732
CGameContext * GameServer() const
Definition: gamecontroller.h:31
void EvaluateSpawnType(CSpawnEval *pEval, int Type, int DDTeam)
Definition: gamecontroller.cpp:108
virtual int OnCharacterDeath(class CCharacter *pVictim, class CPlayer *pKiller, int Weapon)
Definition: gamecontroller.cpp:490
std::vector< vec2 > m_avSpawnPoints[3]
Definition: gamecontroller.h:22
void DoWarmup(int Seconds)
Definition: gamecontroller.cpp:513
IServer * Server() const
Definition: gamecontroller.h:33
void ChangeMap(const char *pToMap)
Definition: gamecontroller.cpp:478
float m_CurrentRecord
Definition: gamecontroller.h:154
class IServer * m_pServer
Definition: gamecontroller.h:26
float EvaluateSpawnPos(CSpawnEval *pEval, vec2 Pos, int DDTeam)
Definition: gamecontroller.cpp:91
virtual bool OnEntity(int Index, int x, int y, int Layer, int Flags, bool Initial, int Number=0)
Definition: gamecontroller.cpp:172
void StartRound()
Definition: gamecontroller.cpp:463
int m_SuddenDeath
Definition: gamecontroller.h:61
class CGameContext * m_pGameServer
Definition: gamecontroller.h:24
int m_RoundCount
Definition: gamecontroller.h:64
int m_RoundStartTick
Definition: gamecontroller.h:59
virtual int GetAutoTeam(int NotThisId)
Definition: gamecontroller.cpp:668
int ClampTeam(int Team)
Definition: gamecontroller.cpp:717
void DoActivityCheck()
Definition: gamecontroller.cpp:48
IGameController(class CGameContext *pGameServer)
Definition: gamecontroller.cpp:23
int m_GameFlags
Definition: gamecontroller.h:66
bool IsTeamPlay()
Definition: gamecontroller.h:151
std::bitset< MAX_CLIENTS > CClientMask
Definition: protocol.h:132
@ GAMEFLAG_TEAMS
Definition: protocol.h:145
@ MAX_MAP_LENGTH
Definition: map.h:12
Definition: scoreworker.h:67
Definition: gamecontroller.h:38
bool m_Got
Definition: gamecontroller.h:47
int m_FriendlyTeam
Definition: gamecontroller.h:48
float m_Score
Definition: gamecontroller.h:49
vec2 m_Pos
Definition: gamecontroller.h:46
CSpawnEval()
Definition: gamecontroller.h:39
vector2_base< float > vec2
Definition: vmath.h:158