3 #include "../gamemode.qh"
5 #define autocvar_g_invasion_point_limit cvar("g_invasion_point_limit")
6 int autocvar_g_invasion_teams;
7 int autocvar_g_invasion_type;
8 bool autocvar_g_invasion_team_spawns;
10 void invasion_Initialize();
12 REGISTER_MUTATOR(inv, false)
16 if (time > 1) // game loads at time 1
17 error("This is a game type and it cannot be added at runtime.");
19 invasion_Initialize();
21 cvar_settemp("g_monsters", "1");
23 GameRules_limit_score(autocvar_g_invasion_point_limit);
25 if (autocvar_g_invasion_teams >= 2)
27 GameRules_teams(true);
28 if (autocvar_g_invasion_team_spawns)
29 have_team_spawns = -1; // request team spawns
33 MUTATOR_ONROLLBACK_OR_REMOVE
35 // we actually cannot roll back invasion_Initialize here
36 // BUT: we don't need to! If this gets called, adding always
42 LOG_INFO("This is a game type and it cannot be removed at runtime.");
58 float inv_monsters_perteam[17];
60 float inv_monsterskill;
62 const float ST_INV_KILLS = 1;
64 const int INV_TYPE_ROUND = 0; // round-based waves of enemies
65 const int INV_TYPE_HUNT = 1; // clear the map of placed enemies
66 const int INV_TYPE_STAGE = 2; // reach the end of the level