mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
stop casting auth state to bool
This commit is contained in:
parent
a1c1472c79
commit
0497cdd49d
|
@ -154,7 +154,7 @@ public:
|
|||
RCON_CID_VOTE=-2,
|
||||
};
|
||||
virtual void SetRconCID(int ClientID) = 0;
|
||||
virtual bool IsAuthed(int ClientID) = 0;
|
||||
virtual int GetAuthedState(int ClientID) = 0;
|
||||
virtual void Kick(int ClientID, const char *pReason) = 0;
|
||||
|
||||
virtual void DemoRecorder_HandleAutoStart() = 0;
|
||||
|
|
|
@ -486,7 +486,7 @@ void CServer::SetRconCID(int ClientID)
|
|||
m_RconClientID = ClientID;
|
||||
}
|
||||
|
||||
bool CServer::IsAuthed(int ClientID)
|
||||
int CServer::GetAuthedState(int ClientID)
|
||||
{
|
||||
return m_aClients[ClientID].m_Authed;
|
||||
}
|
||||
|
|
|
@ -232,7 +232,7 @@ public:
|
|||
int Init();
|
||||
|
||||
void SetRconCID(int ClientID);
|
||||
bool IsAuthed(int ClientID);
|
||||
int GetAuthedState(int ClientID);
|
||||
int GetClientInfo(int ClientID, CClientInfo *pInfo);
|
||||
void GetClientAddr(int ClientID, char *pAddrStr, int Size);
|
||||
const char *ClientName(int ClientID);
|
||||
|
|
|
@ -945,7 +945,7 @@ void CGameContext::OnClientEnter(int ClientID)
|
|||
if(m_VoteCloseTime)
|
||||
SendVoteSet(ClientID);
|
||||
|
||||
m_apPlayers[ClientID]->m_Authed = Server()->IsAuthed(ClientID);
|
||||
m_apPlayers[ClientID]->m_Authed = Server()->GetAuthedState(ClientID);
|
||||
}
|
||||
|
||||
void CGameContext::OnClientConnected(int ClientID)
|
||||
|
|
|
@ -698,7 +698,7 @@ void IGameController::Tick()
|
|||
break;
|
||||
}
|
||||
#endif
|
||||
if(GameServer()->m_apPlayers[i] && GameServer()->m_apPlayers[i]->GetTeam() != TEAM_SPECTATORS && !Server()->IsAuthed(i))
|
||||
if(GameServer()->m_apPlayers[i] && GameServer()->m_apPlayers[i]->GetTeam() != TEAM_SPECTATORS && Server()->GetAuthedState(i) == IServer::AUTHED_NO)
|
||||
{
|
||||
if(Server()->Tick() > GameServer()->m_apPlayers[i]->m_LastActionTick+g_Config.m_SvInactiveKickTime*Server()->TickSpeed()*60)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue