]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/w_fireball.qc
Merge branch 'TimePath/mutator_cleanup' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / w_fireball.qc
index 39d5832f1d70ea7323f66d2eb3860d4217b7b480..112b6524eade596d0601257b7507cd508a4ca006 100644 (file)
@@ -161,7 +161,7 @@ void W_Fireball_Think(void)
        self.nextthink = time + 0.1;
 }
 
-void W_Fireball_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void W_Fireball_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(self.health <= 0)
                return;
@@ -213,7 +213,7 @@ void W_Fireball_Attack1(void)
 
        CSQCProjectile(proj, true, PROJECTILE_FIREBALL, true);
 
-       other = proj; MUTATOR_CALLHOOK(EditProjectile);
+       MUTATOR_CALLHOOK(EditProjectile, self, proj);
 }
 
 void W_Fireball_AttackEffect(float i, vector f_diff)
@@ -344,10 +344,10 @@ void W_Fireball_Attack2(void)
 
        CSQCProjectile(proj, true, PROJECTILE_FIREMINE, true);
 
-       other = proj; MUTATOR_CALLHOOK(EditProjectile);
+       MUTATOR_CALLHOOK(EditProjectile, self, proj);
 }
 
-float W_Fireball(float req)
+bool W_Fireball(int req)
 {
        switch(req)
        {
@@ -371,7 +371,7 @@ float W_Fireball(float req)
                                        if(random() < 0.01) self.bot_primary_fireballmooth = 1;
                                }
                        }
-                       
+
                        return true;
                }
                case WR_THINK:
@@ -393,7 +393,7 @@ float W_Fireball(float req)
                                        weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(fireball, animtime), w_ready);
                                }
                        }
-                       
+
                        return true;
                }
                case WR_INIT:
@@ -405,7 +405,7 @@ float W_Fireball(float req)
                        precache_sound("weapons/fireball_fire.wav");
                        precache_sound("weapons/fireball_fire2.wav");
                        precache_sound("weapons/fireball_prefire2.wav");
-                       FIREBALL_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP)
+                       FIREBALL_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
                        return true;
                }
                case WR_SETUP:
@@ -420,7 +420,7 @@ float W_Fireball(float req)
                }
                case WR_CONFIG:
                {
-                       FIREBALL_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS)
+                       FIREBALL_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
                        return true;
                }
                case WR_RESETPLAYER:
@@ -447,7 +447,7 @@ float W_Fireball(float req)
 }
 #endif
 #ifdef CSQC
-float W_Fireball(float req)
+bool W_Fireball(int req)
 {
        switch(req)
        {
@@ -465,7 +465,7 @@ float W_Fireball(float req)
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, "weapons/fireball_impact2.wav", VOL_BASE, ATTEN_NORM * 0.25); // long range boom
                        }
-                       
+
                        return true;
                }
                case WR_INIT: