mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Reset Teams in Client
This commit is contained in:
parent
24b4c7ac71
commit
e6718e2ede
|
@ -418,6 +418,7 @@ void CGameClient::OnReset()
|
|||
m_RaceMsgSent = false;
|
||||
m_ShowOthers = -1;
|
||||
m_FlagPos = vec2(-1, -1);
|
||||
m_Teams.Reset();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#include "teamscore.h"
|
||||
|
||||
CTeamsCore::CTeamsCore() {
|
||||
for(int i = 0; i < MAX_CLIENTS; ++i) {
|
||||
m_Team[i] = TEAM_FLOCK;
|
||||
}
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool CTeamsCore::SameTeam(int Cid1, int Cid2) {
|
||||
|
@ -21,4 +19,10 @@ void CTeamsCore::Team(int Cid, int Team) {
|
|||
bool CTeamsCore::CanCollide(int Cid1, int Cid2) {
|
||||
if(m_Team[Cid1] == TEAM_SUPER || m_Team[Cid2] == TEAM_SUPER) return true;
|
||||
return m_Team[Cid1] == m_Team[Cid2];
|
||||
}
|
||||
|
||||
void CTeamsCore::Reset() {
|
||||
for(int i = 0; i < MAX_CLIENTS; ++i) {
|
||||
m_Team[i] = TEAM_FLOCK;
|
||||
}
|
||||
}
|
|
@ -21,6 +21,8 @@ public:
|
|||
|
||||
int Team(int Cid);
|
||||
void Team(int Cid, int Team);
|
||||
|
||||
void Reset();
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue