]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/gamemodes/gamemode/lms/sv_lms.qh
Merge branch 'master' into Mario/speed_var
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / lms / sv_lms.qh
1 #pragma once
2
3 #include <common/mutators/base.qh>
4 #include <common/scores.qh>
5
6 // 1 when player presses F3 to spectate for the first time (he only gets a warning)
7 // 2 when player goes spectator (presses F3 to spectate for the second time)
8 // 3 when player disconnects
9 .int lms_spectate_warning;
10
11 #define autocvar_g_lms_lives_override cvar("g_lms_lives_override")
12 string autocvar_g_lms_weaponarena = "most_available";
13
14 void lms_Initialize();
15
16 REGISTER_MUTATOR(lms, false)
17 {
18     MUTATOR_STATIC();
19         MUTATOR_ONADD
20         {
21         GameRules_limit_score(((!autocvar_g_lms_lives_override) ? -1 : autocvar_g_lms_lives_override));
22         GameRules_limit_lead(0);
23         GameRules_score_enabled(false);
24         GameRules_scoring(0, 0, 0, {
25             field(SP_LMS_LIVES, "lives", SFL_SORT_PRIO_SECONDARY);
26             field(SP_LMS_RANK, "rank", SFL_LOWER_IS_BETTER | SFL_RANK | SFL_SORT_PRIO_PRIMARY | SFL_ALLOW_HIDE);
27         });
28
29                 lms_Initialize();
30         }
31         return 0;
32 }
33
34 // lives related defs
35 int lms_lowest_lives;
36 int LMS_NewPlayerLives();