]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/hook.qc
Weapons: require explicit pickup model
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / hook.qc
index b7f51b54c4319c66590ef942576399b2a898ddd4..52ce4da71a5def5b79770898dac611348eee510d 100644 (file)
@@ -8,6 +8,7 @@ REGISTER_WEAPON(
 /* rating    */ 0,
 /* color     */ '0 0.5 0',
 /* modelname */ "hookgun",
+/* model     */ MDL_HOOK_ITEM,
 /* simplemdl */ "foobar",
 /* crosshair */ "gfx/crosshairhook 0.5",
 /* wepimg    */ "weaponhook",
@@ -134,7 +135,7 @@ void W_Hook_Attack2(void)
        entity gren;
 
        //W_DecreaseAmmo(WEP_CVAR_SEC(hook, ammo)); // WEAPONTODO: Figure out how to handle ammo with hook secondary (gravitybomb)
-       W_SetupShot(self, false, 4, W_Sound("hookbomb_fire"), CH_WEAPON_A, WEP_CVAR_SEC(hook, damage));
+       W_SetupShot(self, false, 4, SND(HOOKBOMB_FIRE), CH_WEAPON_A, WEP_CVAR_SEC(hook, damage));
 
        gren = spawn();
        gren.owner = gren.realowner = self;
@@ -174,7 +175,7 @@ void W_Hook_Attack2(void)
        MUTATOR_CALLHOOK(EditProjectile, self, gren);
 }
 
-bool W_Hook(int req)
+bool W_Hook(entity thiswep, int req)
 {SELFPARAM();
        float hooked_time_max, hooked_fuel;
 
@@ -288,9 +289,6 @@ bool W_Hook(int req)
                }
                case WR_INIT:
                {
-                       precache_sound(W_Sound("hook_impact")); // done by g_hook.qc
-                       precache_sound(W_Sound("hook_fire"));
-                       precache_sound(W_Sound("hookbomb_fire"));
                        HOOK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
                        return true;
                }
@@ -334,7 +332,7 @@ bool W_Hook(int req)
 }
 #endif
 #ifdef CSQC
-bool W_Hook(int req)
+bool W_Hook(entity thiswep, int req)
 {SELFPARAM();
        switch(req)
        {
@@ -344,13 +342,12 @@ bool W_Hook(int req)
                        org2 = w_org + w_backoff * 2;
                        pointparticles(particleeffectnum(EFFECT_HOOK_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
-                               sound(self, CH_SHOTS, W_Sound("hookbomb_impact"), VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS, SND_HOOKBOMB_IMPACT, VOL_BASE, ATTN_NORM);
 
                        return true;
                }
                case WR_INIT:
                {
-                       precache_sound(W_Sound("hookbomb_impact"));
                        return true;
                }
                case WR_ZOOMRETICLE: