Xonotic
cl_cts.qc
Go to the documentation of this file.
1
#include "
cl_cts.qh
"
2
3
#include <
common/mutators/base.qh
>
4
5
REGISTER_MUTATOR
(cl_cts,
true
);
6
7
MUTATOR_HOOKFUNCTION
(cl_cts, HUD_Physics_showoptional)
8
{
9
return
ISGAMETYPE
(CTS);
// show the optional physics panel
10
}
11
12
MUTATOR_HOOKFUNCTION
(cl_cts, HUD_StrafeHUD_showoptional)
13
{
14
return
ISGAMETYPE
(CTS);
// show the optional strafehud
15
}
16
17
MUTATOR_HOOKFUNCTION
(cl_cts, HUD_Score_show)
18
{
19
return
spectatee_status
== -1 &&
ISGAMETYPE
(CTS);
// hide the score panel while observing
20
}
21
22
MUTATOR_HOOKFUNCTION
(cl_cts, DrawScoreboardItemStats)
23
{
24
return
ISGAMETYPE
(CTS);
// hide the item stats panel
25
}
26
27
MUTATOR_HOOKFUNCTION
(cl_cts, DrawDeathScoreboard)
28
{
29
return
ISGAMETYPE
(CTS);
// no scoreboard shown while dead
30
}
31
32
MUTATOR_HOOKFUNCTION
(cl_cts, DrawScoreboardAccuracy)
33
{
34
return
ISGAMETYPE
(CTS);
// accuracy is not a factor in this gamemode
35
}
36
37
MUTATOR_HOOKFUNCTION
(cl_cts, ShowRankings)
38
{
39
if
(
ISGAMETYPE
(CTS))
40
{
41
M_ARGV
(0,
string
) = _(
"Rankings"
);
42
return
true
;
43
}
44
}
45
46
MUTATOR_HOOKFUNCTION
(cl_cts, ShowNames_Draw)
47
{
48
return
(
ISGAMETYPE
(CTS) &&
M_ARGV
(1,
float
) <
ALPHA_MIN_VISIBLE
);
49
}
50
51
MUTATOR_HOOKFUNCTION
(cl_cts, ShowRaceTimer)
52
{
53
return
ISGAMETYPE
(CTS);
// show the race timer panel
54
}
ALPHA_MIN_VISIBLE
const float ALPHA_MIN_VISIBLE
Definition:
main.qh:128
REGISTER_MUTATOR
REGISTER_MUTATOR(cl_cts, true)
base.qh
MUTATOR_HOOKFUNCTION
MUTATOR_HOOKFUNCTION(cl_cts, HUD_Physics_showoptional)
Definition:
cl_cts.qc:7
M_ARGV
#define M_ARGV(x, type)
Definition:
events.qh:17
spectatee_status
float spectatee_status
Definition:
main.qh:166
ISGAMETYPE
#define ISGAMETYPE(NAME)
Definition:
main.qh:32
cl_cts.qh
common
gamemodes
gamemode
cts
cl_cts.qc
Generated on Thu Mar 17 2022 17:26:27 for Xonotic by
1.8.13