]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Merge branch 'master' into Mario/wepent_experimental
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index 2dcd241eca89ec048bdee8cf1dc960958f9b9a88..9c19493dced8d4a72e34053237c816449e44335e 100644 (file)
@@ -13,6 +13,7 @@
 #include <common/ent_cs.qh>
 #include <common/anim.qh>
 #include <common/constants.qh>
+#include <common/net_linked.qh>
 #include <common/debug.qh>
 #include <common/mapinfo.qh>
 #include <common/gamemodes/_mod.qh>
@@ -21,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 +315,12 @@ void viewmodel_draw(entity this)
        }
        {
                string name = wep.mdl;
+               if(wep == WEP_TUBA)
+               {
+                       name = (this.tuba_instrument == 0) ? "tuba" :
+                          (this.tuba_instrument == 1) ? "akordeon" :
+                                                    "kleinbottle";
+               }
                bool swap = name != this.name_last;
                // if (swap)
                {
@@ -354,7 +363,6 @@ void viewmodel_draw(entity this)
        setorigin(this, this.origin);
 }
 
-entity viewmodels[MAX_WEAPONSLOTS];
 STATIC_INIT(viewmodel) {
     for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
        viewmodels[slot] = new(viewmodel);