total_control_points = 0;
for (int i = 1; i <= NUM_TEAMS; ++i)
{
- Team_SetNumberOfControlPoints(Team_GetTeamFromIndex(i), 0);
+ Team_SetNumberOfOwnedItems(Team_GetTeamFromIndex(i), 0);
}
IL_EACH(g_dompoints, true,
{
continue;
}
entity team_ = Entity_GetTeam(it.goalentity);
- int num_control_points = Team_GetNumberOfControlPoints(team_);
+ int num_control_points = Team_GetNumberOfOwnedItems(team_);
++num_control_points;
- Team_SetNumberOfControlPoints(team_, num_control_points);
+ Team_SetNumberOfOwnedItems(team_, num_control_points);
});
}
}
Domination_count_controlpoints();
- int winner_team = Team_GetWinnerTeam_WIthControlPoints(total_control_points);
+ int winner_team = Team_GetWinnerTeam_WIthOwnedItems(total_control_points);
if (winner_team == -1)
return 0;
total_generators = 0;
for (int i = 1; i <= NUM_TEAMS; ++i)
{
- Team_SetNumberOfControlPoints(Team_GetTeamFromIndex(i), 0);
+ Team_SetNumberOfOwnedItems(Team_GetTeamFromIndex(i), 0);
}
for(e = ons_worldgeneratorlist; e; e = e.ons_worldgeneratornext)
{
continue;
}
entity team_ = Entity_GetTeam(e);
- int num_control_points = Team_GetNumberOfControlPoints(team_);
- ++num_control_points;
- Team_SetNumberOfControlPoints(team_, num_control_points);
+ int num_generators = Team_GetNumberOfOwnedItems(team_);
+ ++num_generators;
+ Team_SetNumberOfOwnedItems(team_, num_generators);
}
}
else { wpforenemy_announced = false; ons_stalemate = false; }
Onslaught_count_generators();
- int winner_team = Team_GetWinnerTeam_WIthControlPoints(1); // actually generators
+ int winner_team = Team_GetWinnerTeam_WIthOwnedItems(1);
if (!winner_team)
return 0;
.int m_num_players; ///< Number of players (both humans and bots) in a team.
.int m_num_bots; ///< Number of bots in a team.
.int m_num_players_alive; ///< Number of alive players in a team.
-.int m_num_control_points; ///< Number of control points owned by a team.
+.int m_num_owned_items; ///< Number of items owned by a team.
string autocvar_g_forced_team_red;
string autocvar_g_forced_team_blue;
return result;
}
-int Team_GetWinnerTeam_WIthControlPoints(int min_control_points)
+int Team_GetWinnerTeam_WIthOwnedItems(int min_control_points)
{
int winner = 0;
for (int i = 0; i < NUM_TEAMS; ++i)
{
- if (g_team_entities[i].m_num_control_points >= min_control_points)
+ if (g_team_entities[i].m_num_owned_items >= min_control_points)
{
if (winner)
return 0;
return (winner ? winner : -1);
}
-int Team_GetNumberOfControlPoints(entity team_ent)
+int Team_GetNumberOfOwnedItems(entity team_ent)
{
- return team_ent.m_num_control_points;
+ return team_ent.m_num_owned_items;
}
-void Team_SetNumberOfControlPoints(entity team_ent, int number)
+void Team_SetNumberOfOwnedItems(entity team_ent, int number)
{
- team_ent.m_num_control_points = number;
+ team_ent.m_num_owned_items = number;
}
-int Team_GetNumberOfTeamsWithControlPoints()
+int Team_GetNumberOfTeamsWithOwnedItems()
{
int result = 0;
for (int i = 0; i < NUM_TEAMS; ++i)
{
- if (g_team_entities[i].m_num_control_points > 0)
+ if (g_team_entities[i].m_num_owned_items > 0)
{
++result;
}
int Team_GetNumberOfAliveTeams();
/// \brief Returns the winner team.
-/// \param[in] min_control_points Minimum number of control points the winner team must have.
-/// \return Winner team or 0 if 2 or more teams have control points or -1 if no team has any control points.
-int Team_GetWinnerTeam_WIthControlPoints(int min_control_points);
+/// \param[in] min_owned_items Minimum number of items the winner team must have.
+/// \return Winner team or 0 if 2 or more teams own items or -1 if no team own any items.
+int Team_GetWinnerTeam_WIthOwnedItems(int min_owned_items);
-/// \brief Returns the number of control points owned by a team.
+/// \brief Returns the number of items owned by a team.
/// \param[in] team_ent Team entity.
-/// \return Number of control points owned by a team.
-int Team_GetNumberOfControlPoints(entity team_ent);
+/// \return Number of items owned by a team.
+int Team_GetNumberOfOwnedItems(entity team_ent);
-/// \brief Sets the number of control points owned by a team.
+/// \brief Sets the number of items owned by a team.
/// \param[in,out] team_ent Team entity.
-/// \param[in] number Number of control points to set.
-void Team_SetNumberOfControlPoints(entity team_ent, int number);
+/// \param[in] number Number of items to set.
+void Team_SetNumberOfOwnedItems(entity team_ent, int number);
-/// \brief Returns the number of teams that own control points.
-/// \return Number of teams that own control points.
-int Team_GetNumberOfTeamsWithControlPoints();
+/// \brief Returns the number of teams that own items.
+/// \return Number of teams that own items.
+int Team_GetNumberOfTeamsWithOwnedItems();
// ======================= Entity specific API ================================