]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/blaster.qc
Merge branch 'TimePath/soundregistry' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / blaster.qc
index e3edb492eba64b9c5d0e5f057b7f96cccfd18824..6b6d207bfada68b1d3a526c601b18f66c7290e45 100644 (file)
@@ -95,7 +95,7 @@ void W_Blaster_Attack(
 {SELFPARAM();
        vector s_forward = v_forward * cos(atk_shotangle * DEG2RAD) + v_up * sin(atk_shotangle * DEG2RAD);
 
-       W_SetupShot_Dir(self, s_forward, false, 3, W_Sound("lasergun_fire"), CH_WEAPON_B, atk_damage);
+       W_SetupShot_Dir(self, s_forward, false, 3, SND(LASERGUN_FIRE), CH_WEAPON_B, atk_damage);
        Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        entity missile = spawn();
@@ -223,10 +223,6 @@ bool W_Blaster(int request)
 
                case WR_INIT:
                {
-                       precache_model(W_Model("g_laser.md3"));
-                       precache_model(W_Model("v_laser.md3"));
-                       precache_model(W_Model("h_laser.iqm"));
-                       precache_sound(W_Sound("lasergun_fire"));
                        BLASTER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
                        return true;
                }
@@ -272,13 +268,12 @@ bool W_Blaster(int request)
                        vector org2;
                        org2 = w_org + w_backoff * 6;
                        pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
-                       if(!w_issilent) { sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTN_NORM); }
+                       if(!w_issilent) { sound(self, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTN_NORM); }
                        return true;
                }
 
                case WR_INIT:
                {
-                       precache_sound(W_Sound("laserimpact"));
                        return true;
                }
                case WR_ZOOMRETICLE: