]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/fireball.qc
Fix the use of self, activator and other globals in .use
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / fireball.qc
index a6db7c9b71ce578845d5058793ed29a1444a340b..a86def7d3635f36ab2f1249b1f7c8ae3b324f653 100644 (file)
@@ -112,6 +112,11 @@ void W_Fireball_Explode()
        remove(self);
 }
 
+void W_Fireball_Explode_use(entity this, entity actor, entity trigger)
+{
+       WITHSELF(this, W_Fireball_Explode());
+}
+
 void W_Fireball_TouchExplode()
 {
        PROJECTILE_TOUCH;
@@ -179,7 +184,7 @@ void W_Fireball_Damage(entity this, entity inflictor, entity attacker, float dam
        if(this.health <= 0)
        {
                this.cnt = 1;
-               WITHSELF(this, W_PrepareExplosionByDamage(attacker, W_Fireball_Explode));
+               W_PrepareExplosionByDamage(this, attacker, W_Fireball_Explode);
        }
 }
 
@@ -196,7 +201,7 @@ void W_Fireball_Attack1()
        proj.bot_dodge = true;
        proj.bot_dodgerating = WEP_CVAR_PRI(fireball, damage);
        proj.pushltime = time + WEP_CVAR_PRI(fireball, lifetime);
-       proj.use = W_Fireball_Explode;
+       proj.use1 = W_Fireball_Explode_use;
        proj.think = W_Fireball_Think;
        proj.nextthink = time;
        proj.health = WEP_CVAR_PRI(fireball, health);