mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-26 18:00:28 +01:00
fix(fgame): properly calculate the number of not ready players
This commit is contained in:
1 file changed
+4
-4
@@ -601,17 +601,17 @@ bool DM_Team::IsEmpty(void) const
|
||||
int DM_Team::NumNotReady(void) const
|
||||
{
|
||||
Player *player;
|
||||
int num = 0;
|
||||
int nNotReady = 0;
|
||||
|
||||
for (int i = 1; i <= m_players.NumObjects(); i++) {
|
||||
player = m_players.ObjectAt(i);
|
||||
|
||||
if (player->IsReady()) {
|
||||
i++;
|
||||
if (!player->IsReady()) {
|
||||
nNotReady++;
|
||||
}
|
||||
}
|
||||
|
||||
return num;
|
||||
return nNotReady;
|
||||
}
|
||||
|
||||
void DM_Team::UpdateTeamStatus(void)
|
||||
|
||||
Reference in new issue
Block a user