]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Hide the item stats panel in CTS, Race, Nexball and Invasion (items serve little...
authorMario <mario.mario@y7mail.com>
Fri, 6 Nov 2020 13:29:00 +0000 (23:29 +1000)
committerMario <mario.mario@y7mail.com>
Fri, 6 Nov 2020 13:29:00 +0000 (23:29 +1000)
qcsrc/common/gamemodes/gamemode/cts/cl_cts.qc
qcsrc/common/gamemodes/gamemode/invasion/_mod.inc
qcsrc/common/gamemodes/gamemode/invasion/_mod.qh
qcsrc/common/gamemodes/gamemode/invasion/cl_invasion.qc [new file with mode: 0644]
qcsrc/common/gamemodes/gamemode/invasion/cl_invasion.qh [new file with mode: 0644]
qcsrc/common/gamemodes/gamemode/nexball/cl_nexball.qc
qcsrc/common/gamemodes/gamemode/race/cl_race.qc

index ee62df152f06143c8e6cb68fd60c1fad24d399a2..ce095bf2032a0e1a63fccaaac1fc0c3840d91148 100644 (file)
@@ -19,6 +19,11 @@ MUTATOR_HOOKFUNCTION(cl_cts, HUD_Score_show)
        return spectatee_status == -1 && ISGAMETYPE(CTS); // hide the score panel while observing
 }
 
+MUTATOR_HOOKFUNCTION(cl_cts, DrawScoreboardItemStats)
+{
+       return ISGAMETYPE(CTS); // hide the item stats panel
+}
+
 MUTATOR_HOOKFUNCTION(cl_cts, DrawDeathScoreboard)
 {
        return ISGAMETYPE(CTS); // no scoreboard shown while dead
index e8b28e96bc460ff67f58b3c84b0ab228c16e551d..ab033e317906f8210f245600ba21fa0cfad53f55 100644 (file)
@@ -1,5 +1,8 @@
 // generated file; do not modify
 #include <common/gamemodes/gamemode/invasion/invasion.qc>
+#ifdef CSQC
+    #include <common/gamemodes/gamemode/invasion/cl_invasion.qc>
+#endif
 #ifdef SVQC
     #include <common/gamemodes/gamemode/invasion/sv_invasion.qc>
 #endif
index 5181956f2023028ddb6c2ff4e6bef2e37bc8ce0b..0b663f5ab455013d58022a5e1c2ea0fd237cf7e9 100644 (file)
@@ -1,5 +1,8 @@
 // generated file; do not modify
 #include <common/gamemodes/gamemode/invasion/invasion.qh>
+#ifdef CSQC
+    #include <common/gamemodes/gamemode/invasion/cl_invasion.qh>
+#endif
 #ifdef SVQC
     #include <common/gamemodes/gamemode/invasion/sv_invasion.qh>
 #endif
diff --git a/qcsrc/common/gamemodes/gamemode/invasion/cl_invasion.qc b/qcsrc/common/gamemodes/gamemode/invasion/cl_invasion.qc
new file mode 100644 (file)
index 0000000..e7dc879
--- /dev/null
@@ -0,0 +1,10 @@
+#include "cl_invasion.qh"
+
+#include <common/mutators/base.qh>
+
+REGISTER_MUTATOR(cl_inv, true);
+
+MUTATOR_HOOKFUNCTION(cl_inv, DrawScoreboardItemStats)
+{
+       return ISGAMETYPE(INVASION); // hide the item stats panel
+}
diff --git a/qcsrc/common/gamemodes/gamemode/invasion/cl_invasion.qh b/qcsrc/common/gamemodes/gamemode/invasion/cl_invasion.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
index 27699571675d1bd65ccb812d17df16b878425b77..fa7be6e5072bb003ef7b996cc2cb04a5c928ee51 100644 (file)
@@ -48,3 +48,8 @@ MUTATOR_HOOKFUNCTION(cl_nb, DrawScoreboardAccuracy)
 {
        return ISGAMETYPE(NEXBALL); // accuracy is not a factor in this gamemode
 }
+
+MUTATOR_HOOKFUNCTION(cl_nb, DrawScoreboardItemStats)
+{
+       return ISGAMETYPE(NEXBALL); // hide the item stats panel
+}
index a47ce272e49d7fd12ec5105be2bc84037146caaa..4311ce777aa813560420fa6cb2bc3fb0df62696f 100644 (file)
@@ -166,6 +166,11 @@ MUTATOR_HOOKFUNCTION(cl_race, HUD_Score_show)
        return spectatee_status == -1 && ISGAMETYPE(RACE); // hide the score panel while observing
 }
 
+MUTATOR_HOOKFUNCTION(cl_race, DrawScoreboardItemStats)
+{
+       return ISGAMETYPE(RACE); // hide the item stats panel
+}
+
 MUTATOR_HOOKFUNCTION(cl_race, ShowRankings)
 {
        if(ISGAMETYPE(RACE))