waeponarena {all,most}_available
[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 .float lms_spectate_warning;
7
8 #define autocvar_g_lms_lives_override cvar("g_lms_lives_override")
9 string autocvar_g_lms_weaponarena;
10
11 void lms_Initialize();
12
13 REGISTER_MUTATOR(lms, false)
14 {
15     MUTATOR_STATIC();
16         MUTATOR_ONADD
17         {
18         GameRules_limit_score(((!autocvar_g_lms_lives_override) ? -1 : autocvar_g_lms_lives_override));
19         GameRules_limit_lead(0);
20         GameRules_score_enabled(false);
21         GameRules_scoring(0, 0, 0, {
22             field(SP_LMS_LIVES, "lives", SFL_SORT_PRIO_SECONDARY);
23             field(SP_LMS_RANK, "rank", SFL_LOWER_IS_BETTER | SFL_RANK | SFL_SORT_PRIO_PRIMARY | SFL_ALLOW_HIDE);
24         });
25
26                 lms_Initialize();
27         }
28         return 0;
29 }
30
31 // lives related defs
32 float lms_lowest_lives;
33 float LMS_NewPlayerLives();