]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/gamemodes/gamemode/cts/cl_cts.qc
Add a mutator hook to indicate whether rankings should be shown
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / cts / cl_cts.qc
1 #include "cl_cts.qh"
2
3 REGISTER_MUTATOR(cl_cts, true);
4
5 MUTATOR_HOOKFUNCTION(cl_cts, HUD_Physics_showoptional)
6 {
7         return ISGAMETYPE(CTS); // show the optional physics panel
8 }
9
10 MUTATOR_HOOKFUNCTION(cl_cts, HUD_Score_show)
11 {
12         return spectatee_status == -1 && ISGAMETYPE(CTS); // hide the score panel while observing
13 }
14
15 MUTATOR_HOOKFUNCTION(cl_cts, DrawDeathScoreboard)
16 {
17         return ISGAMETYPE(CTS); // no scoreboard shown while dead
18 }
19
20 MUTATOR_HOOKFUNCTION(cl_cts, ShowRankings)
21 {
22         if(ISGAMETYPE(CTS))
23         {
24                 M_ARGV(0, string) = _("Rankings");
25                 return true;
26         }
27 }