]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/tuba.qc
Weapons: remove unused field w_simplemdl
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / tuba.qc
index 05787ba58777650a2522782586f6900e7df64fa3..ef73577549f14f1753d13b87cc4407e82975685f 100644 (file)
@@ -8,7 +8,7 @@ REGISTER_WEAPON(
 /* rating    */ BOT_PICKUP_RATING_MID,
 /* color     */ '0 1 0',
 /* modelname */ "tuba",
-/* simplemdl */ "foobar",
+/* model     */ MDL_TUBA_ITEM,
 /* crosshair */ "gfx/crosshairtuba",
 /* wepimg    */ "weapontuba",
 /* refname   */ "tuba",
@@ -336,8 +336,7 @@ void W_Tuba_NoteOn(float hittype)
        {
                if(self.tuba_note.cnt != n || self.tuba_note.tuba_instrument != self.tuba_instrument)
                {
-                       SELFCALL(self.tuba_note, W_Tuba_NoteOff());
-                       SELFCALL_DONE();
+                       WITH(entity, self, self.tuba_note, W_Tuba_NoteOff());
                }
        }
 
@@ -366,7 +365,7 @@ void W_Tuba_NoteOn(float hittype)
        }
 }
 
-bool W_Tuba(int req)
+bool W_Tuba(entity thiswep, int req)
 {SELFPARAM();
        switch(req)
        {
@@ -404,8 +403,7 @@ bool W_Tuba(int req)
                        {
                                if(!self.BUTTON_ATCK && !self.BUTTON_ATCK2)
                                {
-                                       SELFCALL(self.tuba_note, W_Tuba_NoteOff());
-                                       SELFCALL_DONE();
+                                       WITH(entity, self, self.tuba_note, W_Tuba_NoteOff());
                                }
                        }
 
@@ -413,13 +411,6 @@ bool W_Tuba(int req)
                }
                case WR_INIT:
                {
-                       precache_model(W_Model("g_tuba.md3"));
-                       precache_model(W_Model("v_tuba.md3"));
-                       precache_model(W_Model("h_tuba.iqm"));
-                       precache_model(W_Model("v_akordeon.md3"));
-                       precache_model(W_Model("h_akordeon.iqm"));
-                       precache_model(W_Model("v_kleinbottle.md3"));
-                       precache_model(W_Model("h_kleinbottle.iqm"));
                        TUBA_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
                        return true;
                }
@@ -490,7 +481,7 @@ bool W_Tuba(int req)
 }
 #endif
 #ifdef CSQC
-bool W_Tuba(int req)
+bool W_Tuba(entity thiswep, int req)
 {SELFPARAM();
        // nothing to do here; particles of tuba are handled differently
        // WEAPONTODO