]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_hagar.qc
Merge remote-tracking branch 'origin/master' into divVerent/force_colors_teamplay
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_hagar.qc
index e6467e4549a60d8c7779845f467c7c3339da8a03..9a4b1ef4495aa95d223d7df5cd15f7e770060f0b 100644 (file)
@@ -25,7 +25,7 @@ void W_Hagar_Damage (entity inflictor, entity attacker, float damage, float deat
        if (self.health <= 0)
                return;
                
-       float is_linkexplode = ((inflictor.realowner == self.realowner) 
+       float is_linkexplode = ( ((inflictor.owner != world) ? (inflictor.owner == self.owner) : TRUE)
                && (inflictor.projectiledeathtype & HITTYPE_SECONDARY) 
                && (self.projectiledeathtype & HITTYPE_SECONDARY));
        
@@ -33,7 +33,7 @@ void W_Hagar_Damage (entity inflictor, entity attacker, float damage, float deat
                is_linkexplode = (is_linkexplode && autocvar_g_balance_hagar_secondary_load_linkexplode);
        else
                is_linkexplode = -1; // not secondary load, so continue as normal without exception.
-               
+
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, is_linkexplode))
                return; // g_projectiles_damage says to halt
 
@@ -101,6 +101,7 @@ void W_Hagar_Attack (void)
 
        missile.angles = vectoangles (missile.velocity);
        missile.flags = FL_PROJECTILE;
+       missile.missile_flags = MIF_SPLASH; 
 
        CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR, TRUE);
 
@@ -144,6 +145,7 @@ void W_Hagar_Attack2 (void)
 
        missile.angles = vectoangles (missile.velocity);
        missile.flags = FL_PROJECTILE;
+       missile.missile_flags = MIF_SPLASH; 
 
        CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR_BOUNCING, TRUE);
 
@@ -174,7 +176,7 @@ void W_Hagar_Attack2_Load_Release (void)
 
        shots = self.hagar_load;
        missile = world;
-       while (counter < shots)
+       for(counter = 0; counter < shots; ++counter)
        {
                missile = spawn ();
                missile.owner = missile.realowner = self;
@@ -197,6 +199,7 @@ void W_Hagar_Attack2_Load_Release (void)
                setorigin (missile, w_shotorg);
                setsize(missile, '0 0 0', '0 0 0');
                missile.movetype = MOVETYPE_FLY;
+               missile.missile_flags = MIF_SPLASH; 
                
                // per-shot spread calculation: the more shots there are, the less spread is applied (based on the bias cvar)
                spread_pershot = ((shots - 1) / (autocvar_g_balance_hagar_secondary_load_max - 1)); 
@@ -223,8 +226,6 @@ void W_Hagar_Attack2_Load_Release (void)
                CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR, TRUE);
 
                other = missile; MUTATOR_CALLHOOK(EditProjectile);
-
-               counter = counter + 1;
        }
 
        weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_hagar_secondary_load_animtime, w_ready);