]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/seeker.qc
Fix the use of self, activator and other globals in .use
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / seeker.qc
index 34b6e895f3af59977f130f90b9cd8ec3f83fcc90..86ea7d1f544d380c1e65784bb2ee7e1ef0d5c21b 100644 (file)
@@ -220,7 +220,7 @@ void W_Seeker_Missile_Damage(entity this, entity inflictor, entity attacker, flo
                this.health = this.health - damage;
 
        if(this.health <= 0)
-               WITHSELF(this, W_PrepareExplosionByDamage(attacker, W_Seeker_Missile_Explode));
+               W_PrepareExplosionByDamage(this, attacker, W_Seeker_Missile_Explode);
 }
 
 /*
@@ -313,6 +313,11 @@ void W_Seeker_Flac_Explode()
        remove(self);
 }
 
+void W_Seeker_Flac_Explode_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, W_Seeker_Flac_Explode());
+}
+
 void W_Seeker_Flac_Touch()
 {
        PROJECTILE_TOUCH;
@@ -355,7 +360,7 @@ void W_Seeker_Fire_Flac(Weapon thiswep)
        missile.bot_dodge               = true;
        missile.bot_dodgerating = WEP_CVAR(seeker, flac_damage);
        missile.touch                   = W_Seeker_Flac_Explode;
-       missile.use                     = W_Seeker_Flac_Explode;
+       missile.use1                    = W_Seeker_Flac_Explode_use;
        missile.think                   = adaptor_think2use_hittype_splash;
        missile.nextthink               = time + WEP_CVAR(seeker, flac_lifetime) + WEP_CVAR(seeker, flac_lifetime_rand);
        missile.solid                   = SOLID_BBOX;