]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/w_hlac.qc
Merge branch 'master' into TimePath/issues/1490
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / w_hlac.qc
index c4e80a4a4fc51f014222b230fac94fade6945219..ab5566992a766651bad4e839bd48df141e04bdb9 100644 (file)
@@ -56,9 +56,9 @@ void W_HLAC_Touch(void)
        PROJECTILE_TOUCH;
 
        self.event_damage = func_null;
-       
+
        isprimary = !(self.projectiledeathtype & HITTYPE_SECONDARY);
-       
+
        RadiusDamage(self, self.realowner, WEP_CVAR_BOTH(hlac, isprimary, damage), WEP_CVAR_BOTH(hlac, isprimary, edgedamage), WEP_CVAR_BOTH(hlac, isprimary, radius), world, world, WEP_CVAR_BOTH(hlac, isprimary, force), self.projectiledeathtype, other);
 
        remove(self);
@@ -77,7 +77,7 @@ void W_HLAC_Attack(void)
         spread = spread * WEP_CVAR_PRI(hlac, spread_crouchmod);
 
        W_SetupShot(self, false, 3, "weapons/lasergun_fire.wav", CH_WEAPON_A, WEP_CVAR_PRI(hlac, damage));
-       pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("laser_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
        if(!autocvar_g_norecoil)
        {
                self.punchangle_x = random() - 0.5;
@@ -110,7 +110,7 @@ void W_HLAC_Attack(void)
 
        CSQCProjectile(missile, true, PROJECTILE_HLAC, true);
 
-       other = missile; MUTATOR_CALLHOOK(EditProjectile);
+       MUTATOR_CALLHOOK(EditProjectile, self, missile);
 }
 
 void W_HLAC_Attack2(void)
@@ -125,7 +125,7 @@ void W_HLAC_Attack2(void)
         spread = spread * WEP_CVAR_SEC(hlac, spread_crouchmod);
 
        W_SetupShot(self, false, 3, "weapons/lasergun_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(hlac, damage));
-       pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("laser_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn();
        missile.owner = missile.realowner = self;
@@ -149,12 +149,12 @@ void W_HLAC_Attack2(void)
     missile.nextthink = time + WEP_CVAR_SEC(hlac, lifetime);
 
        missile.flags = FL_PROJECTILE;
-       missile.missile_flags = MIF_SPLASH; 
+       missile.missile_flags = MIF_SPLASH;
        missile.projectiledeathtype = WEP_HLAC | HITTYPE_SECONDARY;
 
        CSQCProjectile(missile, true, PROJECTILE_HLAC, true);
 
-       other = missile; MUTATOR_CALLHOOK(EditProjectile);
+       MUTATOR_CALLHOOK(EditProjectile, self, missile);
 }
 
 // weapon frames
@@ -203,7 +203,7 @@ void W_HLAC_Attack2_Frame(void)
        }
 }
 
-float W_HLAC(float req)
+bool W_HLAC(int req)
 {
        float ammo_amount;
        switch(req)
@@ -235,7 +235,7 @@ float W_HLAC(float req)
                                        weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(hlac, animtime), w_ready);
                                }
                        }
-                       
+
                        return true;
                }
                case WR_INIT:
@@ -282,7 +282,7 @@ float W_HLAC(float req)
 }
 #endif
 #ifdef CSQC
-float W_HLAC(float req)
+bool W_HLAC(int req)
 {
        switch(req)
        {
@@ -293,7 +293,7 @@ float W_HLAC(float req)
                        pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
-                               
+
                        return true;
                }
                case WR_INIT: