]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Hack to fix tuba alternative instruments
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index d309f4d9a757a44feaa13089473b52d2f1986d45..12f4c6a1d0e68e5b72ebb0a475d31c5dee265045 100644 (file)
@@ -22,6 +22,8 @@
 #include <common/triggers/target/music.qh>
 #include <common/teams.qh>
 
+#include <common/weapons/weapon/tuba.qh>
+
 #include <common/vehicles/all.qh>
 #include <common/weapons/_all.qh>
 #include <common/viewloc.qh>
@@ -312,6 +314,12 @@ void viewmodel_draw(entity this)
        {
                static string name_last;
                string name = wep.mdl;
+               if(wep == WEP_TUBA)
+               {
+                       name = (this.tuba_instrument == 0) ? "tuba" :
+                          (this.tuba_instrument == 1) ? "akordeon" :
+                                                    "kleinbottle";
+               }
                bool swap = name != name_last;
                // if (swap)
                {