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 GameRules_spawning_teams(autocvar_g_invasion_team_spawns);
32 MUTATOR_ONROLLBACK_OR_REMOVE
34 // we actually cannot roll back invasion_Initialize here
35 // BUT: we don't need to! If this gets called, adding always
41 LOG_INFO("This is a game type and it cannot be removed at runtime.");
57 float inv_monsters_perteam[17];
59 float inv_monsterskill;
61 const float ST_INV_KILLS = 1;
63 const int INV_TYPE_ROUND = 0; // round-based waves of enemies
64 const int INV_TYPE_HUNT = 1; // clear the map of placed enemies
65 const int INV_TYPE_STAGE = 2; // reach the end of the level