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