Fix engine client flags not being updated under some conditions

The flags were only being updated based on rather arbitrary conditions, so they could never reset to zero or reduced.
The flags are now always updated. The flags are only used in the output of the `status` command.
This commit is contained in:
Robert Müller 2022-06-30 23:46:59 +02:00
parent 747fe9308f
commit 6d0806f99d
2 changed files with 2 additions and 4 deletions

View file

@ -548,8 +548,7 @@ void CServer::SetClientFlags(int ClientID, int Flags)
if(ClientID < 0 || ClientID >= MAX_CLIENTS || m_aClients[ClientID].m_State < CClient::STATE_READY)
return;
if(Flags > m_aClients[ClientID].m_Flags)
m_aClients[ClientID].m_Flags = Flags;
m_aClients[ClientID].m_Flags = Flags;
}
void CServer::Kick(int ClientID, const char *pReason)

View file

@ -529,8 +529,7 @@ void CPlayer::OnDirectInput(CNetObj_PlayerInput *NewInput)
if(Server()->IsSixup(m_ClientID))
NewInput->m_PlayerFlags = PlayerFlags_SevenToSix(NewInput->m_PlayerFlags);
if(NewInput->m_PlayerFlags)
Server()->SetClientFlags(m_ClientID, NewInput->m_PlayerFlags);
Server()->SetClientFlags(m_ClientID, NewInput->m_PlayerFlags);
AfkTimer();