]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/seeker.qc
Merge branch 'master' into develop
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / seeker.qc
index d7ba289f5ca7ee9f1e92669a9fd5098b93791771..cdf7d6a2e3e3f83b3bd41a88bee123cce6597690 100644 (file)
@@ -86,23 +86,23 @@ void W_Seeker_Missile_Think(entity this)
        {
                if(dist <= WEP_CVAR(seeker, missile_proxy_maxrange))
                {
-                       if(this.autoswitch == 0)
+                       if(this.cvar_cl_autoswitch == 0)
                        {
-                               this.autoswitch = time + WEP_CVAR(seeker, missile_proxy_delay);
+                               this.cvar_cl_autoswitch = time + WEP_CVAR(seeker, missile_proxy_delay);
                        }
                        else
                        {
-                               if(this.autoswitch <= time)
+                               if(this.cvar_cl_autoswitch <= time)
                                {
                                        W_Seeker_Missile_Explode(this, NULL);
-                                       this.autoswitch = 0;
+                                       this.cvar_cl_autoswitch = 0;
                                }
                        }
                }
                else
                {
-                       if(this.autoswitch != 0)
-                               this.autoswitch = 0;
+                       if(this.cvar_cl_autoswitch != 0)
+                               this.cvar_cl_autoswitch = 0;
                }
        }
        ///////////////
@@ -171,7 +171,7 @@ void W_Seeker_Fire_Missile(Weapon thiswep, entity actor, .entity weaponentity, v
        makevectors(actor.v_angle);
        W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_SEEKER_FIRE, CH_WEAPON_A, 0, ((m_target != NULL) ? thiswep.m_id | HITTYPE_SECONDARY : thiswep.m_id));
        w_shotorg += f_diff;
-       Send_Effect(EFFECT_SEEKER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
+       W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
 
        //actor.detornator         = false;
 
@@ -269,7 +269,8 @@ void W_Seeker_Fire_Flac(Weapon thiswep, entity actor, .entity weaponentity)
        W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_FLAC_FIRE, CH_WEAPON_A, WEP_CVAR(seeker, flac_damage), thiswep.m_id | HITTYPE_SECONDARY);
        w_shotorg += f_diff;
 
-       Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
+       // uses hagar effects!
+       W_MuzzleFlash(WEP_HAGAR, actor, weaponentity, w_shotorg, w_shotdir);
 
        missile                                 = new(missile);
        missile.owner                   = missile.realowner = actor;