]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/cts/cl_cts.qc
Merge branch 'master' into Lyberta/WaypointIcons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / cts / cl_cts.qc
diff --git a/qcsrc/common/gamemodes/gamemode/cts/cl_cts.qc b/qcsrc/common/gamemodes/gamemode/cts/cl_cts.qc
new file mode 100644 (file)
index 0000000..27d6b86
--- /dev/null
@@ -0,0 +1,42 @@
+#include "cl_cts.qh"
+
+REGISTER_MUTATOR(cl_cts, true);
+
+MUTATOR_HOOKFUNCTION(cl_cts, HUD_Physics_showoptional)
+{
+       return ISGAMETYPE(CTS); // show the optional physics panel
+}
+
+MUTATOR_HOOKFUNCTION(cl_cts, HUD_Score_show)
+{
+       return spectatee_status == -1 && ISGAMETYPE(CTS); // hide the score panel while observing
+}
+
+MUTATOR_HOOKFUNCTION(cl_cts, DrawDeathScoreboard)
+{
+       return ISGAMETYPE(CTS); // no scoreboard shown while dead
+}
+
+MUTATOR_HOOKFUNCTION(cl_cts, DrawScoreboardAccuracy)
+{
+       return ISGAMETYPE(CTS); // accuracy is not a factor in this gamemode
+}
+
+MUTATOR_HOOKFUNCTION(cl_cts, ShowRankings)
+{
+       if(ISGAMETYPE(CTS))
+       {
+               M_ARGV(0, string) = _("Rankings");
+               return true;
+       }
+}
+
+MUTATOR_HOOKFUNCTION(cl_cts, ShowNames_Draw)
+{
+       return (ISGAMETYPE(CTS) && M_ARGV(1, float) < ALPHA_MIN_VISIBLE);
+}
+
+MUTATOR_HOOKFUNCTION(cl_cts, ShowRaceTimer)
+{
+       return ISGAMETYPE(CTS); // show the race timer panel
+}