Merge branch 'master' into terencehill/bot_ai
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / keyhunt / keyhunt.qh
1 #pragma once
2
3 #ifdef SVQC
4 #include <common/mutators/base.qh>
5 #define autocvar_g_keyhunt_point_limit cvar("g_keyhunt_point_limit")
6 int autocvar_g_keyhunt_point_leadlimit;
7 bool autocvar_g_keyhunt_team_spawns;
8 void kh_Initialize();
9
10 REGISTER_MUTATOR(kh, false)
11 {
12     MUTATOR_STATIC();
13         MUTATOR_ONADD
14         {
15                 GameRules_teams(true);
16         GameRules_spawning_teams(autocvar_g_keyhunt_team_spawns);
17         GameRules_limit_score(autocvar_g_keyhunt_point_limit);
18         GameRules_limit_lead(autocvar_g_keyhunt_point_leadlimit);
19
20                 kh_Initialize();
21         }
22         return 0;
23 }
24
25 #define FOR_EACH_KH_KEY(v) for(v = kh_worldkeylist; v; v = v.kh_worldkeynext )
26
27 // ALL OF THESE should be removed in the future, as other code should not have to care
28
29 // used by bots:
30 bool kh_tracking_enabled;
31 .entity kh_next;
32
33 USING(kh_Think_t, void());
34 void kh_StartRound();
35 void kh_Controller_SetThink(float t, kh_Think_t func);
36 #endif