#include "teamplay.qh"
-#include "client.qh"
-#include <server/gamelog.qh>
-#include <server/damage.qh>
-#include "race.qh"
-#include "scores.qh"
-#include "scores_rules.qh"
-
-#include "bot/api.qh"
-
-#include "command/vote.qh"
-
-#include <server/mutators/_mod.qh>
-
#include <common/deathtypes/all.qh>
#include <common/gamemodes/_mod.qh>
#include <common/teams.qh>
+#include <server/bot/api.qh>
+#include <server/bot/default/cvars.qh>
+#include <server/campaign.qh>
+#include <server/client.qh>
+#include <server/command/vote.qh>
+#include <server/damage.qh>
+#include <server/gamelog.qh>
+#include <server/mutators/_mod.qh>
+#include <server/race.qh>
+#include <server/scores.qh>
+#include <server/scores_rules.qh>
/// \brief Describes a state of team balance entity.
enum
entity g_team_entities[NUM_TEAMS]; ///< Holds global team entities.
-STATIC_INIT(g_team_entities)
+void Team_InitTeams()
{
+ if (g_team_entities[0])
+ return;
for (int i = 0; i < NUM_TEAMS; ++i)
{
- g_team_entities[i] = spawn();
+ g_team_entities[i] = new_pure();
}
}
{
SetPlayerColors(player, new_color);
}
- // TODO: Should we really bother with this?
if(!IS_CLIENT(player))
{
- // since this is an engine function, and gamecode doesn't have any calls earlier than this, do the connecting message here
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_CONNECTING,
- player.netname);
return;
}
if (!teamplay)
{
return;
}
- Player_SetTeamIndexChecked(player, Team_TeamToIndex((new_color & 0x0F) +
- 1));
+ Player_SetTeamIndexChecked(player, Team_TeamToIndex((new_color & 0x0F) + 1));
}