]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_fireball.qc
Merge remote-tracking branch 'origin/master' into samual/notification_rewrite
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_fireball.qc
index 77c67b46bb9f96e548731ad022d702ae1f005fdd..d7cd57e8225000bf1ddadf35529e5900925f51a4 100644 (file)
@@ -14,7 +14,7 @@ void W_Fireball_Explode (void)
        vector dir;
        float d;
 
-       self.event_damage = SUB_Null;
+       self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
 
        // 1. dist damage
@@ -159,7 +159,8 @@ void W_Fireball_Attack1()
        proj.touch = W_Fireball_TouchExplode;
        setsize(proj, '-16 -16 -16', '16 16 16');
        proj.flags = FL_PROJECTILE;
-
+    proj.missile_flags = MIF_SPLASH | MIF_PROXY;
+    
        CSQCProjectile(proj, TRUE, PROJECTILE_FIREBALL, TRUE);
 
        other = proj; MUTATOR_CALLHOOK(EditProjectile);
@@ -289,7 +290,8 @@ void W_Fireball_Attack2()
 
        proj.angles = vectoangles(proj.velocity);
        proj.flags = FL_PROJECTILE;
-
+    proj.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_ARC;
+    
        CSQCProjectile(proj, TRUE, PROJECTILE_FIREMINE, TRUE);
 
        other = proj; MUTATOR_CALLHOOK(EditProjectile);
@@ -302,7 +304,7 @@ void spawnfunc_weapon_fireball (void)
 
 float w_fireball(float req)
 {
-       float ammo_amount;
+       //float ammo_amount;
        if (req == WR_AIM)
        {
                self.BUTTON_ATCK = FALSE;
@@ -372,6 +374,24 @@ float w_fireball(float req)
        {
                self.fireball_primarytime = time;
        }
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+                       return WEAPON_FIREBALL_SUICIDE_FIREMINE;
+               else
+                       return WEAPON_FIREBALL_SUICIDE_BLAST;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               if(w_deathtype & HITTYPE_SECONDARY)
+               {
+                       return WEAPON_FIREBALL_MURDER_FIREMINE;
+               }
+               else
+               {
+                       return WEAPON_FIREBALL_MURDER_BLAST;
+               }
+       }
        return TRUE;
 }
 #endif
@@ -397,37 +417,6 @@ float w_fireball(float req)
        {
                precache_sound("weapons/fireball_impact2.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = _("%s forgot about some firemine");
-               else
-                       w_deathtypestring = _("%s should have used a smaller gun");
-       }
-       else if (req == WR_KILLMESSAGE)
-       {
-               if(w_deathtype & HITTYPE_SECONDARY)
-               {
-                       if(w_deathtype & HITTYPE_HEADSHOT)
-                               w_deathtypestring = _("%s tried to catch %s's firemine");
-                       else
-                               w_deathtypestring = _("%s fatefully ignored %s's firemine");
-               }
-               else
-               {
-                       if(w_deathtype & HITTYPE_BOUNCE)
-                       {
-                               if(w_deathtype & HITTYPE_SPLASH) // BFG effect
-                                       w_deathtypestring = _("%s could not hide from %s's fireball");
-                               else // laser
-                                       w_deathtypestring = _("%s saw the pretty lights of %s's fireball");
-                       }
-                       else if(w_deathtype & HITTYPE_SPLASH)
-                               w_deathtypestring = _("%s got too close to %s's fireball");
-                       else
-                               w_deathtypestring = _("%s tasted %s's fireball");
-               }
-       }
        return TRUE;
 }
 #endif