2#ifndef GAME_SERVER_TEAMS_H
3#define GAME_SERVER_TEAMS_H
48 void KillTeam(
int Team,
int NewStrongId,
int ExceptId = -1);
50 void OnTeamFinish(
int Team,
CPlayer **Players,
unsigned int Size,
int TimeTicks,
const char *pTimestamp);
102 int Count(
int Team)
const;
182 void SetSaving(
int TeamId, std::shared_ptr<CScoreSaveResult> &SaveResult)
189 if(TeamId < TEAM_FLOCK || TeamId >=
TEAM_SUPER)
Definition: character.h:30
Definition: gamecontext.h:79
CPlayer * m_apPlayers[MAX_CLIENTS]
Definition: gamecontext.h:180
IServer * Server() const
Definition: gamecontext.h:160
@ FLAG_SIXUP
Definition: gamecontext.h:259
@ FLAG_SIX
Definition: gamecontext.h:258
class CCharacter * GetPlayerChar(int ClientId)
Definition: gamecontext.cpp:208
void OnCharacterSpawn(int ClientId)
Definition: teams.cpp:1065
int Count(int Team) const
Definition: teams.cpp:454
bool TeamFlock(int Team)
Definition: teams.h:154
float * GetCurrentTimeCp(CPlayer *Player)
Definition: teams.cpp:665
bool IsPractice(int Team)
Definition: teams.h:207
void SetFinished(int ClientId, bool Finished)
Definition: teams.h:177
class CGameContext * GameServer()
Definition: teams.h:79
CTeamsCore m_Core
Definition: teams.h:65
CGameTeams(CGameContext *pGameContext)
Definition: teams.cpp:14
bool IsInvited(int Team, int ClientId)
Definition: teams.h:162
bool IsStarted(int Team)
Definition: teams.h:167
int GetStartTime(CPlayer *Player)
Definition: teams.cpp:634
int GetFirstEmptyTeam() const
Definition: teams.cpp:1219
void OnTeamFinish(int Team, CPlayer **Players, unsigned int Size, int TimeTicks, const char *pTimestamp)
Definition: teams.cpp:676
bool m_aTeeFinished[MAX_CLIENTS]
Definition: teams.h:23
void CheckTeamFinished(int Team)
Definition: teams.cpp:314
uint64_t m_aLastSwap[MAX_CLIENTS]
Definition: teams.h:32
bool TeeStarted(int ClientId)
Definition: teams.h:131
void Reset()
Definition: teams.cpp:20
int m_aTeamState[NUM_DDRACE_TEAMS]
Definition: teams.h:26
bool m_aTeamLocked[NUM_DDRACE_TEAMS]
Definition: teams.h:27
void KillTeam(int Team, int NewStrongId, int ExceptId=-1)
Definition: teams.cpp:473
void OnFinish(CPlayer *Player, int TimeTicks, const char *pTimestamp)
Definition: teams.cpp:698
const char * SetCharacterTeam(int ClientId, int Team)
Definition: teams.cpp:377
@ TEAMSTATE_FINISHED
Definition: teams.h:62
@ TEAMSTATE_STARTED_UNFINISHABLE
Definition: teams.h:61
@ TEAMSTATE_STARTED
Definition: teams.h:58
@ TEAMSTATE_EMPTY
Definition: teams.h:56
@ TEAMSTATE_OPEN
Definition: teams.h:57
void SwapTeamCharacters(CPlayer *pPrimaryPlayer, CPlayer *pTargetPlayer, int Team)
Definition: teams.cpp:910
int GetDDRaceState(CPlayer *Player)
Definition: teams.cpp:613
int GetTeamState(int Team)
Definition: teams.h:141
class CGameContext * m_pGameContext
Definition: teams.h:40
void ResetRoundState(int Team)
Definition: teams.cpp:42
void ResetInvited(int Team)
Definition: teams.cpp:1172
bool TeamLocked(int Team)
Definition: teams.h:146
void SetStarted(int ClientId, bool Started)
Definition: teams.h:172
bool m_aTeamFlock[NUM_DDRACE_TEAMS]
Definition: teams.h:28
void ChangeTeamState(int Team, int State)
Definition: teams.cpp:468
bool m_aTeamSentStartWarning[NUM_DDRACE_TEAMS]
Definition: teams.h:33
void RequestTeamSwap(CPlayer *pPlayer, CPlayer *pTargetPlayer, int Team)
Definition: teams.cpp:863
void ProcessSaveTeam()
Definition: teams.cpp:981
CClientMask m_aInvited[NUM_DDRACE_TEAMS]
Definition: teams.h:29
void SetTeamFlock(int Team, bool Mode)
Definition: teams.cpp:1166
void KillSavedTeam(int ClientId, int Team)
Definition: teams.cpp:1188
void SetTeamLock(int Team, bool Lock)
Definition: teams.cpp:1160
int m_aLastChat[MAX_CLIENTS]
Definition: teams.h:24
void OnCharacterStart(int ClientId)
Definition: teams.cpp:71
CClientMask TeamMask(int Team, int ExceptId=-1, int Asker=-1, int VersionFlags=CGameContext::FLAG_SIX|CGameContext::FLAG_SIXUP)
Definition: teams.cpp:510
void OnCharacterDeath(int ClientId, int Weapon)
Definition: teams.cpp:1084
void SetDDRaceState(CPlayer *Player, int DDRaceState)
Definition: teams.cpp:624
void SetLastTimeCp(CPlayer *Player, int LastTimeCp)
Definition: teams.cpp:655
void SetStartTime(CPlayer *Player, int StartTime)
Definition: teams.cpp:645
bool TeamFinished(int Team)
Definition: teams.cpp:498
void SetClientInvited(int Team, int ClientId, bool Invited)
Definition: teams.cpp:1177
void ResetSwitchers(int Team)
Definition: teams.cpp:61
void Tick()
Definition: teams.cpp:215
void SetSaving(int TeamId, std::shared_ptr< CScoreSaveResult > &SaveResult)
Definition: teams.h:182
void OnCharacterFinish(int ClientId)
Definition: teams.cpp:189
CPlayer * GetPlayer(int ClientId)
Definition: teams.h:74
bool m_aTeeStarted[MAX_CLIENTS]
Definition: teams.h:22
CCharacter * Character(int ClientId)
Definition: teams.h:70
bool GetSaving(int TeamId)
Definition: teams.h:187
void ResetSavedTeam(int ClientId, int Team)
Definition: teams.cpp:1200
class IServer * Server()
Definition: teams.h:83
std::shared_ptr< CScoreSaveResult > m_apSaveTeamResult[NUM_DDRACE_TEAMS]
Definition: teams.h:31
bool TeeFinished(int ClientId)
Definition: teams.h:136
void SetPractice(int Team, bool Enabled)
Definition: teams.h:197
void SendTeamsState(int ClientId)
Definition: teams.cpp:588
void SetForceCharacterTeam(int ClientId, int Team)
Definition: teams.cpp:408
int m_aTeamUnfinishableKillTick[NUM_DDRACE_TEAMS]
Definition: teams.h:38
bool m_aPractice[NUM_DDRACE_TEAMS]
Definition: teams.h:30
Definition: teamscore.h:25
CConfig g_Config
Definition: config.cpp:12
std::bitset< MAX_CLIENTS > CClientMask
Definition: protocol.h:132
@ MAX_CLIENTS
Definition: protocol.h:88
Definition: scoreworker.h:152
@ SV_TEAM_FORCED_SOLO
Definition: teamscore.h:21
@ TEAM_SUPER
Definition: teamscore.h:10
@ NUM_DDRACE_TEAMS
Definition: teamscore.h:11